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
#!/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 / gist:3170689
Created July 24, 2012 15:32 — forked from tonyarnold/gist:3162762
Git config aliases for markdown release notes
[alias]
co = checkout
tagsbydate = for-each-ref --sort=-taggerdate --format='%(refname:short)' refs/tags
previoustag = !sh -c 'git tagsbydate --count 2 | cut -f2 | sed -n 2p'
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
markdownlog = log --color --pretty=format:'* %s `%Cred%h%Creset` - %C(bold blue)[%an](mailto:%ae)%Creset' --abbrev-commit --dense --no-merges --reverse
releasenotes = !sh -c 'git markdownlog ...`git previoustag`'
tree = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --decorate"
fix = "commit --amend -C HEAD"
di = "diff --color"

Ruby Global Setup

  1. Install homebrew.
  2. brew install rbenv ruby-build
  3. echo 'eval "$(rbenv init -)"' >> $HOME/.bash_profile
  4. rbenv install 2.2.0
  5. rbenv global 2.2.0
  6. rbenv rehash
  7. gem install bundler rails
@peelman
peelman / ping.rb
Created October 30, 2015 20:59 — forked from DiogoAndre/ping.rb
Simple ICMP Ping script in Ruby. Using the Net-Ping gem https://github.com/djberg96/net-ping
require 'net/ping'
@icmp = Net::Ping::ICMP.new('142.40.81.34')
rtary = []
pingfails = 0
repeat = 5
puts 'starting to ping'
(1..repeat).each do
if @icmp.ping
@peelman
peelman / index.html
Last active October 31, 2015 15:52 — forked from dgs700/index.html
<!doctype html>
<html lang=en>
<head>
<meta charset="utf-8" />
<meta name="verify-v1" content="91yIG+EaOdwKuPX+R9ChHEWVXJ6wdQsq0gqD1c1sbaY="/>
<title>David Shapiro, Resume- Web Developer</title>
<style type="text/css">
body{font-family:Geneva, Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;color:#000000;text-align:center;margin:0;padding:0;line-height:1.5em;}
header, section, article{display:block;}
header{text-align:center;position:relative;z-index:1;}
@peelman
peelman / README.md
Created November 4, 2015 17:59 — forked from roelentless/README.md
Countdown widget for Dashing

Description

Simple Dashing widget to countdown until a certain moment. Flashes the widget when finished.

##Usage

To use this widget, copy countdown.html, countdown.coffee, and countdown.scss into the /widgets/countdown directory.

To include the widget in a dashboard, add the following snippet to the dashboard layout file:

@peelman
peelman / README.md
Last active November 11, 2015 21:11 — forked from bitflingr/README.md
Dashing widget for puppetdb

##Description Simple Dashing widget (and associated job) to display general puppetdb status. Pulled the API calls from Puppetboard.

WARNING: This only works if puppetdb is listening on HTTP. I have not gotten around to getting this to work with SSL client certificates yet. If you know how, please leave them at the comments below.

##Screenshot

##Dependencies None