Skip to content

Instantly share code, notes, and snippets.

@vimtaai
vimtaai / markdown-flavors.md
Last active April 19, 2024 23:08
Comparison of features in various Markdown flavors

Comparison of syntax extensions in Markdown flavors

I created a crude comparison of the syntax of the various common Markdown extensions to have a better view on what are the most common extensions and what is the most widely accepted syntax for them. The list of Markdown flavors that I looked at was based on the list found on CommonMark's GitHub Wiki.

Flavor Superscript Subscript Deletion*
Strikethrough
Insertion* Highlight* Footnote Task list Table Abbr Deflist Smart typo TOC Math Math Block Mermaid
GFM
@jboner
jboner / latency.txt
Last active April 19, 2024 23:08
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@imneonizer
imneonizer / how-to-download-from-pan-baidu.md
Created October 28, 2021 08:59
How to download from pan.baidu without account

How to download from pan.baidu.com

Disclaimer:

  • This methods uses a 3rd party website: https://baidu.kinh.cc/.
  • I don't know chinese and after one day of searching for a method I finally found this. I don't know how safe this website is but it does the job.
  • Do it on your own responsibility. I have no idea about possible copyright (if there is such a thing in China) and other stuff regarding to this.

Steps

1. Open the website mentioned above and fill out fields as following:

@stecman
stecman / NewKittyWindow.scpt
Last active April 19, 2024 23:00
New Kitty terminal window global hotkey on Mac OSX
# Open a new kitty terminal window on MacOS
#
# 1. Copy this script into AppleScript Editor and save it somewhere
# 2. Use something like Apptivate to run the script on a global hotkey:
# http://www.apptivateapp.com/
#
# Note this script doesn't work well as a Service through Automator as the
# "click menu" functionality requires accessibility privileges granted.
# Services run as the focused app, so that setup would require every context
# the shortcut is run from to have accessibility granted.
@bradtraversy
bradtraversy / tailwind-webpack-setup.md
Last active April 19, 2024 23:00
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@afair
afair / tm.sh
Last active April 19, 2024 22:59
Tmux rails session wrapper script
#!/usr/bin/env bash
################################################################################
# Script to initiate (or connect to) a tmux session
###############################################################################
# Starts session and returns, or attaches to existing session name and exits.
function tm_session { # session name
#echo tmux start-server
tmux start-server
#echo tmux has-session -t $1
@gitaarik
gitaarik / git_submodules.md
Last active April 19, 2024 22:59
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@mathix420
mathix420 / medium.user.js
Last active April 19, 2024 22:59
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.3
// @inject-into content
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active April 19, 2024 22:59
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@khakimov
khakimov / gist:3558086
Created August 31, 2012 19:49
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'