Skip to content

Instantly share code, notes, and snippets.

View hacknightly's full-sized avatar
:octocat:
On Github

Darrell Banks hacknightly

:octocat:
On Github
View GitHub Profile
script(id='pageTpl', type='text/html')
| <div class="page">
| <div class="head"><%=title%> - <%=path%></div>
| <div class="body">
| <ul>
| <% _(actions).each(function(action) { %>
| <li>
| <%=action.name%> - <%=Helpers.df(action.time)%>
| <% if (action.ext) { %>
| <i class="pop icon-info-sign" data-content="<%=_.template($('#extTpl').html(), action)%>" data-original-title="Extra Information"></i>
@hacknightly
hacknightly / gist:4698714
Created February 2, 2013 18:27
Audio only ffmpeg
#!/bin/sh
./configure \
--prefix=$PREFIX \
--enable-cross-compile \
--arch=$ARCH \
--target-os=darwin \
--cc="/usr/bin/gcc-4.0" \
--extra-ldflags="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch $ARCH" \
--extra-cflags="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch $ARCH" \
@hacknightly
hacknightly / gist:3783894
Created September 25, 2012 19:23 — forked from JosephPecoraro/shell-execution.rb
Shell Execution in Ruby
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111
@hacknightly
hacknightly / riffwave.js
Created September 24, 2012 15:20
riffwave.js
/*
* RIFFWAVE.js v0.03 - Audio encoder for HTML5 <audio> elements.
* Copyleft 2011 by Pedro Ladaria <pedro.ladaria at Gmail dot com>
*
* Public Domain
*
* Changelog:
*
* 0.01 - First release
* 0.02 - New faster base64 encoding
@hacknightly
hacknightly / django.wsgi
Created June 7, 2012 18:45
An example django.wsgi file
import os, sys
sys.path.append('/home/staging/')
sys.path.append('/home/staging/app/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
@hacknightly
hacknightly / nginx.conf
Created June 7, 2012 17:44
Basic Nginx Conf
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}