Skip to content

Instantly share code, notes, and snippets.

View nuex's full-sized avatar
👾

Chase James nuex

👾
  • Lexington, KY
View GitHub Profile
@rabidpraxis
rabidpraxis / s3_mass_bucket_delete.rb
Created April 2, 2013 16:53
Delete s3 bucket with minimal api calls
require 'fog'
bucket = 'bucket-name'
credentials = {
:provider => 'AWS',
:aws_access_key_id => 'access_key_id',
:aws_secret_access_key => 'secret_key',
}
fog = Fog::Storage.new(credentials)
@NoobsArePeople2
NoobsArePeople2 / gist:4576561
Created January 20, 2013 03:44
How to assign a hotkey to the Snipping Tool in Windows 8.

OSX has a great shortcut for taking screen shots: cmd + shift + 4. Here's how to assign ctrl + shift + 4 to open the Snipping Tool in Windows 8.

  1. Open the Start Screen.
  2. Type "Snipping Tool" to search for the Snipping Tool.
  3. Right-click the icon that appears in the search results and select "Open File Location" at the bottom of the screen.
  4. In the Explorer window that opens right-click the Snipping Tool shortcut. Select "Properties".
  5. In the "Shortcut" tab click into the "Shortcut Key" field.
  6. Press ctrl, shift and 4.
  7. Click, Apply then OK.
@errordeveloper
errordeveloper / Unicorn_and_Upstart.md
Last active February 9, 2022 09:21
Upstart config for a Rails app using Unicorn HTTP server

Using Unicorn with Upstart

This configuration works with Upstart on Ubuntu 12.04 LTS

The reason why it needs to be done this way (i.e. with the pre-start and post-stop stanzas), is because Upstart is unable to track whever Unicorn master process re-execs itself on hot deploys. One can use it without hot-deploys and run Unicorn in foreground also, it then only needs one exec stanza.

This presumes you are not using RVM, so no voodoo dances.

@xslogic
xslogic / gist:700908
Created November 15, 2010 20:43
FTP Patch for resuming FTP download..
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index 534fcae..1062c08 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -31,11 +31,11 @@
%% API - Client interface
-export([cd/2, close/1, delete/2, formaterror/1,
lcd/2, lpwd/1, ls/1, ls/2,
- mkdir/2, nlist/1, nlist/2,
+ mkdir/2, nlist/1, nlist/2, sizeof/2,