Skip to content

Instantly share code, notes, and snippets.

@algobardo
algobardo / git-php-webhook.php
Last active September 9, 2015 16:38 — forked from marcelosomers/git-php-webhook.php
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
@algobardo
algobardo / ramdisk.sh
Last active September 8, 2015 08:55 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
/* Sample FunctionExpressionInvocation */
var x = ((x) => x*2)(2);
/* Sample conditional expression */
var y = (x>50)?5:6;
Generates
@algobardo
algobardo / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@algobardo
algobardo / gist:89a52a836fbb2b4e5f93
Last active August 29, 2015 14:14
Gradle and one-jar with maven publishing
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
apply plugin: 'maven'