Skip to content

Instantly share code, notes, and snippets.

View peelman's full-sized avatar

Nick Peelman peelman

View GitHub Profile
namespace :assets do
desc "Display asset path"
task :paths => :environment do
Rails.application.config.assets.paths.each do |path|
puts path
end
end
end
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 4.0 of October 23, 2014
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 4.0 of October 23, 2014
@peelman
peelman / sed.txt
Created January 5, 2015 15:57
one-line SED Scripts
Source: http://www.pement.org/sed/sed1line.txt
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
@peelman
peelman / keybase.md
Created January 12, 2015 18:35
Keybase Verification

Keybase proof

I hereby claim:

  • I am peelman on github.
  • I am peelman (https://keybase.io/peelman) on keybase.
  • I have a public key whose fingerprint is 65CC 9AC0 C9E1 4163 2FD3 EE5F 8B7B CDAF 7166 2480

To claim this, I am signing this object:

#!/usr/bin/perl
#
# Update the path to your lease file below
use strict;
use File::Copy;
#use DateTime;
#always parse a copy not the live file
#my $leasefile = '/var/lib/dhcpd/dhcpd.leases';
my $leasefile = '/var/lib/dhcp/db/dhcpd.leases';
@peelman
peelman / JS GPS Coordinate Object.html
Created January 23, 2012 21:23
Javascript GPS Coordinate Object
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>GPS Coords</title>
<script>
var map;
var info;
var latitude;
var longitude;
@peelman
peelman / strings.js
Created February 18, 2012 05:55
Useful JS String Extensions
// from: http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
//Trim String
String.prototype.trim = function(){
return this.replace(/^\s+|\s+$/g, "");
};
//Camel Case
String.prototype.toCamel = function(){
return this.replace(/(\-[a-z])/g, function($1){return $1.toUpperCase().replace('-','');});
@peelman
peelman / bbdiff
Created May 22, 2012 21:12
Use TextMate to impersonate BBEdit for use with GitBox
#!/bin/bash
diff -u $1 $2 | mate -w
@peelman
peelman / flagWithReminder.scpt
Created June 27, 2012 05:08
Alfred Extension: Flag a Message with Reminder
-- Flag a Message and Set a Reminder
-- https://gist.github.com/3001622
-- ©2012 Nick Peelman http://peelman.us
--
-- Thanks to Don Southard for his Create Reminders Task
-- http://dirtdon.com
set tomorrow to ((current date) + (1 * days))
tell application "Mail"
set manyMessages to selection
repeat with aMessage in manyMessages