Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
linkedin.com/in/denzuko

Dwight Spencer denzuko

💬
linkedin.com/in/denzuko
View GitHub Profile
@denzuko
denzuko / gist:3393753
Created August 19, 2012 08:47 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@denzuko
denzuko / Jabber-SH
Created September 7, 2012 02:37 — forked from pcreux/Jabber-SH
Jabber-SH — SH console via XMPP/Jabber (GTalk) Jabber-SH allows to you to administrate a remote computer via a command line through a Jabber client. It’s like SSH via GoogleTalk! :)
#!/usr/bin/env ruby
# Jabber-SH — SH console via XMPP/Jabber (GTalk)
#
# Jabber-SH allows you to administrate a remote computer via a command line
# through a Jabber client. It’s like SSH via GoogleTalk! :)
# This is just a hack but it might be usefull sometime to run basic commands
# on a machine that is not accessible via ssh.
#
# Philippe Creux. pcreux/AT/gmail/DOT/com
@denzuko
denzuko / jquery.ba-tinypubsub.js
Created October 18, 2012 10:35 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@denzuko
denzuko / README.md
Created October 18, 2012 12:56 — forked from MauroJr/README.md
Pub/sub with MongoDB, jQuery, and Node.js

Pub/sub with MongoDB and Node.js

Setup:

$ mongo
> use pubsub
> db.createCollection('messages', { capped: true, size: 100000 })
> db.messages.insert({})

Introduction

ssh-srv-wrapper is bash shell script which tries to find a SSH SRV record for the first host and uses what is found rather than what was passed (if a valid record is found).

Install

Run the script directly or feel free to rename or symlink to the name ssh. It will look for another ssh in your path to execute.

@denzuko
denzuko / renamemp3
Last active December 24, 2015 18:59 — forked from anonymous/renamemp3
#!/bin/bash
###############################################################################
#
# renamemp3 - Version 1.0
# Copyrighted (c)2013 Dwight Spencer (@denzuko) <[email protected]>
# All Rights Reserved. Licenced under OSI MIT licence.
#
# renames files in a directory given by parameters to append '.mp3'
#
###############################################################################
gem 'coderay', require: false
gem 'slop', require: false
gem 'method_source', require: false
gem 'pry', require: false
gem 'yard', require: false
gem 'pry-doc', require: false
gem 'columnize', require: false
gem 'debugger-ruby_core_source', require: false
gem 'debugger-linecache', require: false
gem 'debugger', require: false
@denzuko
denzuko / notify.sh
Last active January 3, 2016 01:49 — forked from apraga/notify.sh
#!/bin/bash
# popup a small notification with 'notify-send'
dis=`formail -X From: -X Subject:`
#TODO: replace the following with sed/read
from=`echo "$dis" | formail -X From:`
sub=`echo "$dis" | formail -X Subject:`
# tweaks < > are special
from=${from//</\(}
from=${from//>/\)}
@denzuko
denzuko / vimrc
Created January 12, 2014 22:44 — forked from apraga/vimrc
" Do you want bepo configuration ? 0 if not
let want_bepo = 1
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
require 'rubygems'
require 'openssl'
require 'digest'
require 'sinatra'
require 'rack/ssl'
use Rack::SSL
use Rack::Auth::Basic, "Restricted Area" do |username, password|
[username, password] == ['admin', 'password']
end