Skip to content

Instantly share code, notes, and snippets.

Matt Montag mmontag

Block or report user

Report or block mmontag

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ygotthilf
ygotthilf / jwtRS256.sh
Last active May 24, 2020
How to generate JWT RS256 key
View jwtRS256.sh
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@iamaziz
iamaziz / git-file-size-growth
Last active Feb 15, 2020
See the total size growth between a number of consecutive commits in your git project. Based on http://stackoverflow.com/questions/10845051/git-show-total-file-size-difference-between-two-commits/10847242#10847242
View git-file-size-growth
#!/usr/bin/env python
"""
Usage:
$ git-file-size-growth <NUM_COMMIT>
note:
- Put `git-file-size-growth` somewhere in your PATH along with `git-file-size-diff`
# see `git-file-size-diff` at: http://stackoverflow.com/questions/10845051/git-show-total-file-size-difference-between-two-commits/10847242#10847242
"""
@MikaelSoderstrom
MikaelSoderstrom / Nightmare-demo.js
Last active May 14, 2018
Testing with mocha, chai and nightmare.js
View Nightmare-demo.js
var path = require('path');
var Nightmare = require('nightmare');
var should = require('chai').should();
describe('Nightmare demo', function () {
this.timeout(15000); // Set timeout to 15 seconds, instead of the original 2 seconds
var url = 'http://localhost:3000';
describe('Start page', function () {
@cobyism
cobyism / gh-pages-deploy.md
Last active May 19, 2020
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).
View gh-pages-deploy.md

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@fredrikw
fredrikw / mediakeys.py
Created Nov 15, 2012
Python script to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys. Easiest used in combination with a launcher/trigger software such as Quicksilver.
View mediakeys.py
#!/usr/bin/python
# CLI program to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys.
# Easiest used in combination with a launcher/trigger software such as Quicksilver.
# Main part taken from http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
# Glue to make it into cli program by Fredrik Wallner http://www.wallner.nu/fredrik/
import Quartz
import sys
You can’t perform that action at this time.