Skip to content

Instantly share code, notes, and snippets.

View stevenscg's full-sized avatar

Chris Stevens stevenscg

View GitHub Profile
@fernandoaleman
fernandoaleman / gist:5083680
Last active October 17, 2023 12:02
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@eladroz
eladroz / gist:5081492
Last active October 6, 2016 18:14
Graphite aggregation rules for StatsD (excl. for threshold metrics)
#
# These settings are REALLY sensitive! do you feel lucky??
# Consult the documentation for etsy/statsd, but it doesn't have all the info.
#
# Notes:
#
# (a) When determining xFilesFactor, make sure the actual reporting rate would fill enough buckets,
# so that the downsampling won't result in null values.
#
# (b) Up to StatsD v0.5.0, counters are written in two places:
@reshefm
reshefm / supervisor-pagerduty.py
Last active December 14, 2015 00:08
Pagerduty notifications for supervisord process crashes
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
# Copyright (C) 2004 Sam Hocevar <[email protected]>
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@larsvegas
larsvegas / mysql-dump-structure-data.sh
Last active March 18, 2019 09:38
mysqldump structure and data in seperate files
#!/bin/sh
MYSQLDUMP=`which mysqldump`
HOST=$1
DATABASE=$2
USER=$3
PASS=$4
DATE=`date -u +"%Y%m%d_%H%M%Z"`
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 20, 2025 21:14
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jamiebegin
jamiebegin / .bashrc
Created January 17, 2013 14:26
Simple Bash script and alias used to manage multiple access credentials for Amazon Web Services from the command line.
# Place this command in your .bashrc (or whatever is appropriate for your shell of choice).
alias aws='client=$1 source ~/bin/aws.sh $client'
@celldee
celldee / gist:4241084
Created December 8, 2012 17:19
Example RabbitMQ configuration file - rabbitmq.config
# /etc/rabbitmq/rabbitmq.config
#
# Follow the instructions on RabbitMQ website to create certificate authority and certificates -
#
# http://www.rabbitmq.com/ssl.html
#
[
{rabbit, [
{tcp_listeners,[{"127.0.0.1",5672}]},
@mschmulen
mschmulen / app.js
Created November 19, 2012 17:40
Navibridge Sample
var NAVIBRIDGE = require('ti.navibridge');
// ApplicationId must be set before adding POIs NaviBridge
// See the documentation for how to get an AppicationId
// NAVIBRIDGE.setApplicationId('<< YOUR APPLICATION ID HERE >>');
var win = Ti.UI.createWindow({ title:"navibridge" });
var openButton = Ti.UI.createButton({ top:5, title:'Open NaviBridge', height:40, width:200 });
var installButton = Ti.UI.createButton({ top:50, title:'Install NaviBridge', height:40, width:200 });
@tonylukasavage
tonylukasavage / index.js
Created November 5, 2012 17:25
Memory management fix
function openView1(e)
{
// $.view1 = Alloy.createController('view1'); // create controller
// $.rootwindow.add($.view1.getView()); // add View1 to Window
// VARS.GVUpdate("globalCurrentView", $.view1.getView()); // Update ref to view2
var view1 = Alloy.createController('view1'); // create controller
$.rootwindow.add(view1.getView()); // add View1 to Window
VARS.GVUpdate("globalCurrentView", view1.getView()); // Update ref to view2
}
@gibbs
gibbs / currency_symbols.php
Last active August 31, 2024 03:16
An array of currency symbols as HTML entities
<?php
$currency_symbols = array(
'AED' => '&#1583;.&#1573;', // ?
'AFN' => '&#65;&#102;',
'ALL' => '&#76;&#101;&#107;',
'AMD' => '',
'ANG' => '&#402;',
'AOA' => '&#75;&#122;', // ?
'ARS' => '&#36;',
'AUD' => '&#36;',