Skip to content

Instantly share code, notes, and snippets.

View DewaldDeJager's full-sized avatar

Dewald de Jager DewaldDeJager

View GitHub Profile
@DewaldDeJager
DewaldDeJager / README.md
Last active April 3, 2024 00:04
Easy GitHub workflow for keeping a fork in sync with upstream

Sync Fork

This workflow uses the GitHub CLI to keep a forked repo in sync with the upstream repo. Add it to your repo as .github/workflows/sync-fork.yaml.

It runs daily to sync the default branch and can be triggered manually for any branch.

@brenns10
brenns10 / .travis.yml
Last active February 1, 2020 05:45
Travis Sphinx Auto-Doc
language: python
python:
- 3.5
install:
- pip install sphinx sphinx_rtd_theme
script: make html
after_success:
- ./push.sh
env:
global:
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@MHenderson
MHenderson / dimacs2gv
Last active August 25, 2017 00:44
Convert graphs from DIMACS to DOT format.
#!/bin/bash
echo 'graph{'
sed -r -e '/^[cp]/d'\
-e 's/[ae] ([0-9]+)\s([0-9]+)/ \1 -- \2;/g'\
$1
echo '}'
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@fcalderan
fcalderan / inception-javascript.js
Created November 2, 2010 09:42
inception explained as a 4 nested javascript closures
/*
* Fabrizio Calderan, twitter @fcalderan, 2010.11.02
* I had an idea: could Inception movie be explained by a few javascript closures
* and variable resolution scope (just for fun)?
*
* Activate javascript console =)
*/
<script>
console.group("inception movie");