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
@echo off | |
SET project=%1 | |
START "vagrant" /D "C:\Projects\%project%" "C:\HashiCorp\Vagrant\bin\vagrant.exe" %2 %3 %4 |
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
FROM phusion/baseimage:0.9.16 | |
CMD ["/sbin/my_init"] | |
RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && \ | |
echo "mysql-server mysql-server/root_password password root" | debconf-set-selections && \ | |
echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections && \ | |
apt-get install -y php5-cli php5-curl php5-gd php5-mcrypt php5-memcache php5-mysql php5-intl mysql-server-5.5 openjdk-7-jdk && \ | |
mkdir /etc/service/mysql && printf "#!/bin/bash\nexec /usr/bin/mysqld_safe" > /etc/service/mysql/run && chmod +x /etc/service/mysql/run && \ | |
sed -ie 's|bind-address.*|bind-address = 0.0.0.0|g' /etc/mysql/my.cnf && \ |
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
#!/usr/bin/env python | |
import sys | |
import beanstalkc | |
b = beanstalkc.Connection() | |
b.watch('deadtraffic') | |
stats = b.stats_tube('deadtraffic') | |
ready = stats.get('current-jobs-ready') | |
for x in range(0, ready): | |
sys.stdout.write('\rClearing {} of {}'.format(x, ready)) | |
sys.stdout.flush() |
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 fs = require('fs'); | |
var path = require('path'); | |
function deleteFolderRecursive(path) { | |
if (fs.existsSync(path)) { | |
console.log('exists'); | |
fs.readdirSync(path).forEach(function(file, index){ | |
var curPath = path + "/" + file; | |
if (fs.lstatSync(curPath).isDirectory()) { | |
deleteFolderRecursive(curPath); |
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
-- Convert a lua table into a lua syntactically correct string | |
function table_to_string(tbl) | |
local result = "{" | |
for k, v in pairs(tbl) do | |
-- Check the key type (ignore any numerical keys - assume its an array) | |
if type(k) == "string" then | |
result = result.."[\""..k.."\"]".."=" | |
end | |
-- Check the value type |
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
// ==UserScript== | |
// @name Sentry clear all | |
// @namespace https://gist.github.com/justnom/9080062/ | |
// @version 0.1 | |
// @description clear all visible Sentry events | |
// @author justnom | |
// @match http://sentry.my-corp.com/* | |
// @grant none | |
// ==/UserScript== |
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 "my_nodejs_app" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn | |
respawn limit 99 5 | |
script | |
export HOME="/home/www/nodejs" |
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
@echo off | |
set OLDDIR=%CD% | |
cd /d %TEMP% | |
set /p repo=Enter the forked Git repo: | |
set /p upstream=Enter the upstream Git repo: | |
:: Clone the forked repo |
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
@echo off | |
start my_exe_with_a_long_random_name_that_I_cannot_change.exe %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
# Scrape FontAwesome latest icon names (4.0.3) | |
import re | |
import os | |
from bs4 import BeautifulSoup | |
import requests | |
def soup_from_url(url): | |
try: |
NewerOlder