Skip to content

Instantly share code, notes, and snippets.

View jorisroovers's full-sized avatar

Joris Roovers jorisroovers

View GitHub Profile
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active April 24, 2024 10:05
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Halleck45
Halleck45 / travis-jenkins-docker.sh
Created May 28, 2014 14:57
.travis.yml avec Jenkins et Docker
#!/bin/bash
EXIT_STATUS=0
echo "#!/bin/bash" > ./docker-travis-test.sh
cat .travis.yml | shyaml get-values before_script >> ./docker-travis-test.sh
cat .travis.yml | shyaml get-values script >> ./docker-travis-test.sh
PHP_VERSIONS=`cat .travis.yml | shyaml get-values php`
for PHP_VERSION in $PHP_VERSIONS
#!/bin/bash
source ${openrc:-~/openrc}
ext_net=${ext_net:-external}
no_gw=${no_gw:-nogw}
hostname=${1:-test}
key_name=${key_name:-public}
flavor=${flavor:-2}
image=${image:-precise-x86_64}
user_data=${user_data:-~/user.data}
net_id=`neutron net-list | grep ${ext_net} | awk -F' ' '{print $2}'`
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@Artanis
Artanis / build.sh
Created September 17, 2011 08:43
Python C Extension Hello World
gcc -fpic --shared $(python-config --includes) greetmodule.c -o greetmodule.so
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@huyng
huyng / reflect.py
Created February 7, 2011 17:57
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):