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 Jul 7, 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 Jul 23, 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 May 20, 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 Jul 2, 2021
Springer made a bunch of books available for free, these were the direct links
@robmiller
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
dypsilon / frontendDevlopmentBookmarks.md
Last active Jul 23, 2021
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active Jul 23, 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: