curl https://gist.githubusercontent.com/wankdanker/2f676cc85f52fd471567/raw -o /usr/local/bin/gen-mac; chmod 755 /usr/local/bin/gen-mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
fs = require('fs'), | |
cwd = process.cwd(); | |
http.createServer() | |
.on('request', function (request, response) { | |
var url = unescape(request.url); | |
var path = cwd + url; | |
console.log(request.socket.remoteAddress, path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
filename=$1 | |
echo "Begin processing file:" $filename | |
dimensions=$(identify -format '%w %h' $filename) | |
IFS=' ' read -a array <<< "$dimensions" | |
width=${array[0]} | |
height=${array[1]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
####################################### | |
# Graphite Install | |
# Run with sudo for best results | |
# | |
####################################### | |
if [[ "$(/usr/bin/whoami)" != "root" ]]; then | |
echo "This script must be run as root or using sudo.Script aborted." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description = [[ | |
Issues an arbitrary HTTP GET request | |
]] | |
--- | |
-- @usage | |
-- nmap --script http-get [--script-args http-get.path=/status] -p <port> <host> | |
-- @args http-get.path The path to request (defaults to /) | |
-- http-get.match String to match in the HTTP response (incl. headers) | |
-- @output |
To use this hook:
- add the
prepare-commit-msg
file at.git/hooks/prepare-commit-msg
and edit as needed - make it executable:
chmod +x .git/hooks/prepare-commit-msg
- disable fast-forward merges:
git config branch.master.mergeoptions "--no-ff"
- that's it!
NOTE: after a failed merge from a forbidden branch, the working tree will still be in a MERGING state. To discard the local working copy state, run:
git reset --merge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var kue = require('kue'), | |
jobs = kue.createQueue(), | |
util = require('util'), | |
noop = function() {}; | |
jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days | |
jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day | |
jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days | |
jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Semantic UI has these classes, however they're only applicable to*/ | |
/* grids, containers, rows and columns.*/ | |
/* plus, there isn't any `mobile hidden`, `X hidden` class.*/ | |
/* this snippet is using the same class names and same approach*/ | |
/* plus a bit more but to all elements.*/ | |
/* see https://github.com/Semantic-Org/Semantic-UI/issues/1114*/ | |
/* Mobile */ | |
@media only screen and (max-width: 767px) { | |
[class*="mobile hidden"], |
OlderNewer