This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%-# This is the default way the file puts post content on the page. %> | |
| <%= @post.body.html_safe %> | |
| <%-# This is the replacement for that line. %> | |
| <%= raw @post.body.html_safe.gsub(/\[gist:(\d+)(\,)(.+)\]/,"<script src='https://gist.github.com/\\1.js?file=\\3'></script>") %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'pathname' | |
| require 'fileutils' | |
| #This assumes this script is your home directory level Rakefile | |
| namespace :dotfiles do | |
| desc "Link ALL the dotfiles!" | |
| task :link do | |
| path = Pathname.new("#{__FILE__}").dirname | |
| Dir.glob "#{path}/Dotfiles/*" do |f| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| ### BEGIN INIT INFO | |
| # Provides: hubot | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the hubot service | |
| # Description: starts the Hubot bot for the Campfire rooms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -size +20000k -exec du -h {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Number::seconds = -> | |
| @ * 1000 | |
| Number::minutes = -> | |
| @seconds() * 60 | |
| Number::minute = Number::minutes | |
| Number::hours = -> | |
| @minutes() * 60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from java.io import * | |
| import java.io.InputStream | |
| import java.io.FileInputStream | |
| import java.lang.String # blah....converting String types between Java/Python is tedious | |
| sys.path.append("pdfbox-1.0.0.jar") # or wherever you stashed it | |
| import org.apache.pdfbox | |
| """ | |
| This method merges the FileInputStreams that the streamList points to, into the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install git vim-nox | |
| cd | |
| git clone [email protected]:mattsgarrison/Dotfiles.git | |
| ln -s ~/Dotfiles/vimrc ~/.vimrc | |
| vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(g,d,f){if(f)d.info("Session found:",f);else return d.warn("No session found!");var h={check:10,wait:500},b=g.autodj={api:g[f],available:function(a){return b.api.taken_dj_map[a]<0},spot:function(){return b.api.become_dj.data("spot")},become:function(a){b.api.callback("become_dj",a)},waiter:function(a){return function(){return b.available(a)?(b.become(a),a):(d.info("Waiting..."),-1)}},seated:function(a){return b.api.djs[a]&&b.api.djs[a][0]===b.api.myuserid},wait:function(a,c){var e=c!==void 0, | |
| a=a||h.check,c=c||b.spot();b.seated(c)?d.warn("Spot",c,"taken!"):(e&&d.error("Spot",c,"missed. Restarting..."),d.info("Polling @",a,"ms"),b.check(a,b.waiter(c)))},check:function(a,c){setTimeout(function(){var e=c.call(b);e>0?(d.warn("Spot",e,"open..."),setTimeout(function(){b.wait(a,e)},h.wait)):b.check(a,c)},a)}}})(window,console,function(g,d,f,h,b,a,c,e,i,j,k){try{return g(d)[f](h)[b][a][c][e]()[i](j)[k]}catch(l){return null}}(jQuery,".invite_dj","data","events","click",0,"handler","toString","match |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for prefix in ['i', 'n', 'v'] | |
| for key in ['<Up>', '<Down>', '<Left>', '<Right>'] | |
| exe prefix . "noremap " . key . " <Nop>" | |
| endfor | |
| endfor |