Skip to content

Instantly share code, notes, and snippets.

Avatar
🧙‍♂️

Bassem Dghaidi Link-

🧙‍♂️
View GitHub Profile
@phooky
phooky / no_masters.sh
Last active Dec 16, 2020
A quick bash script for changing the "master" branch of your github repo(s) to an alternative of your choosing.
View no_masters.sh
#!/bin/bash
# There's a better way to do this! Use:
# https://github.com/dfm/rename-github-default-branch
# instead.
#
# Also: don't change the default branch name on your gists! Github appears to have them
# locked to master; it will break your gist.
set -e
@primetheus
primetheus / docker_svn-server.md
Last active May 14, 2021 — forked from dpmex4527/docker_svn-server.md
Set up SVN server on docker
View docker_svn-server.md
@sebble
sebble / stars.sh
Last active May 15, 2021
List all starred repositories of a GitHub user.
View stars.sh
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 16, 2021
Self Signed Certificate with Custom Root CA
View self-signed-certificate-with-custom-ca.md

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@bearfrieze
bearfrieze / comprehensions.md
Last active Apr 7, 2021
Comprehensions in Python the Jedi way
View comprehensions.md

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@bishboria
bishboria / springer-free-maths-books.md
Last active May 12, 2021
Springer made a bunch of books available for free, these were the direct links
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 17, 2021
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 18, 2021
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 — forked from jboner/latency.txt
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs