Skip to content

Instantly share code, notes, and snippets.

View jssjr's full-sized avatar

Scott Sanders jssjr

View GitHub Profile
@jeremyschulman
jeremyschulman / junos-walk-lldp.rb
Last active December 11, 2015 04:39
Simple demonstration of "walking LLDP" in a Junos network to create a connection map
require 'highline/import'
require 'net/netconf/jnpr'
start_at = ARGV[0] || begin
puts "You need to specify a starting target ip/host"
exit 1
end
my_username = ENV["USER"]
puts "login: #{my_username}"
@tsnow
tsnow / _sort_env_json.rb
Last active December 10, 2015 00:19
sorting environments/*.json for chef
#! /usr/bin/env ruby
# ruby sort_env_json.rb environments/*.json
# ruby sort_env_json.rb environments/*.json --like environments/prod.json
require './json_file'
require 'optparse'
begin
$stderr.puts "please supply a list of environments/*.json paths you'd like to have sorted alphabetically"
exit(1)
@ttscoff
ttscoff / rtftomarkdown.rb
Created October 9, 2012 21:05
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
@ralph
ralph / github-flavored-markdown.rb
Created October 20, 2011 11:39
Markdown Processor for Redcarpet version 2, for usage on the command line, in Marked etc. Supports syntax highlighting via Pygments.
#!/usr/bin/env ruby
# Processor for Github flavored markdown, inspired by:
# https://github.com/alampros/Docter/blob/master/bin/github-flavored-markdown.rb
#
# Current version of this script can be found here:
# https://gist.github.com/1300939
#
# Adapted for Redcarpet version 2 by Ralph von der Heyden
# http://github.com/ralph
# http://twitter.com/ralph
@andoriyu
andoriyu / README
Created September 30, 2011 05:29
rc.d script for unicorn (FreeBSD)
unicorn_profiles="dev prod"
unicorn_dev_enable="yes"
unicorn_dev_user="devuser"
unicorn_dev_listen="/tmp/unicorn.dev.socket"
unicorn_dev_dir="/usr/local/www/dev"
unicorn_dev_config="/usr/local/www/dev/config.ru"
unicorn_dev_env="development"
unicorn_dev_flags="" # any additional flags
unicorn_dev_rails="YES" # For rails
@mleinart
mleinart / graphTemplates.conf
Created September 22, 2011 17:25
Solarized graph template for Graphite
[solarized-dark]
background = #002b36
foreground = #839496
majorLine = #fdf6e3
minorLine = #eee8d5
lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False