Skip to content

Instantly share code, notes, and snippets.


Bassem Dghaidi Link-

View GitHub Profile
phooky /
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.
# There's a better way to do this! Use:
# 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 /
Last active May 14, 2021 — forked from dpmex4527/
Set up SVN server on docker
sebble /
Last active Jul 7, 2021
List all starred repositories of a GitHub user.
STARS=$(curl -sI$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
echo You have $STARS starred repositories.
fntlnz /
Last active Jul 23, 2021
Self Signed Certificate with Custom Root CA

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 /
Last active May 20, 2021
Comprehensions in Python the Jedi way

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 /
Last active Jul 2, 2021
Springer made a bunch of books available for free, these were the direct links
robmiller / .gitconfig
Created Jul 17, 2013
Some useful Git aliases that I use every day
View .gitconfig
# Working with branches
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
dypsilon /
Last active Jul 23, 2021
A badass list of frontend development resources I collected over time.
dergachev /
Last active Jul 23, 2021
OS X Screencast to animated GIF

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


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