Skip to content

Instantly share code, notes, and snippets.

View GabLeRoux's full-sized avatar
:shipit:
Shipping code for humans ✌

Gabriel Le Breton GabLeRoux

:shipit:
Shipping code for humans ✌
View GitHub Profile
// Description:
// Milton basic commands.
import Slack from 'node-slack';
let slack = new Slack('https://hooks.slack.com/services/something/reallysecure');
function johnnyBomb (msg) {
slack.send({
text: 'DESTROY! DESTROY!',
@pyrtsa
pyrtsa / jsonview.css
Created April 3, 2013 22:40
CSS for JSONView (the Google Chrome plugin)
body {
white-space: pre;
font-family: Menlo, monospace;
font-size: 13px;
}
.property {
/*font-weight: bold;*/
color: #3ac;
}
@grahams
grahams / feedly-fluid-unread.js
Last active December 20, 2015 09:30
Fluid userscript for Feedly to badge the dock icon with a better count (instead of maxing out at 100+)
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
script.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(script);
// Poll for jQuery to come into existance
var checkReady = function(callback) {
if (window.jQuery) {
@GabLeRoux
GabLeRoux / unitySizeAnalyzer.sh
Created November 5, 2016 00:22 — forked from elaberge/unitySizeAnalyzer.sh
Unity App Size Analyzer
#!/usr/bin/env bash
function dumpBundle {
FILE=$1
OUTDIR=$2
LZMADIR=$3
OUTPATH="$OUTDIR/$FILE"
LZMAPATH="$LZMADIR/$FILE"
mkdir -p $(dirname "$OUTPATH")
@bmwant
bmwant / stateMock.js
Last active June 8, 2017 13:29
Angular mock for the state
angular.module('stateMock', []);
angular.module('stateMock').service("$state", function($q) {
this.expectedTransitions = [];
this.transitionTo = function(stateName) {
if(this.expectedTransitions.length > 0) {
var expectedState = this.expectedTransitions.shift();
if(expectedState !== stateName) {
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName );
}
} else {
@bitmand
bitmand / gist:c6b7332214d858130c52
Last active December 20, 2017 13:51
Salt Stack state for creating a uniq 2048-bit diffie hellman group
# Create a unique 2048 Diffie Hellman group
# https://weakdh.org
/etc/ssl/dhparams.pem:
cmd.run:
- name: openssl dhparam -out /etc/ssl/dhparams.pem 2048
- unless: test -f /etc/ssl/dhparams.pem
@elaberge
elaberge / unitySizeAnalyzer.sh
Created November 4, 2016 22:56
Unity App Size Analyzer
#!/usr/bin/env bash
function dumpBundle {
FILE=$1
OUTDIR=$2
LZMADIR=$3
OUTPATH="$OUTDIR/$FILE"
LZMAPATH="$LZMADIR/$FILE"
mkdir -p $(dirname "$OUTPATH")
@GabLeRoux
GabLeRoux / how-to-add-ssh-key-to-remote-host.md
Last active September 5, 2018 18:49
Generate a new ssh key and add it to remote server's authorized_keys

1. Generate yourself a new ssh key

# Generate new ssh key (from github)
# https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
ssh-keygen -t rsa -b 4096 -C "email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/EXAMPLE_rsa
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane