This file contains 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
setxkbmap -option caps:swapescape | |
sh ~/.fehbg & | |
devmon & | |
exec i3 |
This file contains 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
class Event | |
include MongoMapper::Document | |
plugin MultiParameterAttributes | |
key :name, String, :required => true | |
key :start_date, Date, :required => true | |
key :start_time, Time, :required => true | |
end |
This file contains 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
module Noodall | |
module Search | |
STOPWORDS = ["about", "above", "above", "across", "after", "afterwards", "again", "against", "all", "almost", "alone", "along", "already", "also", "although", "always", "among", "amongst", "amoungst", "amount", "and", "another", "any", "anyhow", "anyone", "anything", "anyway", "anywhere", "are", "around", "back", "became", "because", "become", "becomes", "becoming", "been", "before", "beforehand", "behind", "being", "below", "beside", "besides", "between", "beyond", "bill", "both", "bottom", "but", "call", "can", "cannot", "cant", "con", "could", "couldnt", "cry", "describe", "detail", "done", "down", "due", "during", "each", "eight", "either", "eleven", "else", "elsewhere", "empty", "enough", "etc", "even", "ever", "every", "everyone", "everything", "everywhere", "except", "few", "fifteen", "fify", "fill", "find", "fire", "first", "five", "for", "former", "formerly", "forty", "found", "four", "from", "front", "full", "further", "get", "give", "had", "has", "hasnt", "have", |
This file contains 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 'mongo_mapper' | |
class Yester | |
include MongoMapper::Document | |
key :name, String | |
alias_attribute :foo, :name | |
alias_method :bar, :name | |
This file contains 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
puts "\n=========================================================" | |
puts " Noodall TEMPLATE" | |
puts "\n=========================================================" | |
require "rails" | |
require "net/http" | |
require "net/https" | |
# Copy a static file from the template into the new application | |
def copy_static_file(path) |
This file contains 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
#!/usr/bin/env ruby | |
require 'json' | |
require 'date' | |
wunderlist = JSON.parse(File.read ARGV[0]) | |
tasks, lists = wunderlist['data']["tasks"], wunderlist['data']["lists"] | |
tasks.map! do |task| | |
due_date = task["due_date"] |
This file contains 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
#!/usr/bin/env ruby | |
# Changed bit of code toggling mute - was throwing errors for me. | |
# Added output, so it could be piped to a notify-osd or somesuch if desired. | |
# Pulseaudio volume control | |
class Pulse | |
attr_reader :volumes, :mutes | |
# Constructor |
This file contains 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
c = Capybara::Node::Simple.new '<p>Hi <a href="/test">there</a> people</p>' | |
c.find('a:contains("there")')[:href] # => "/test" |
This file contains 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
if exists('$TMUX') | |
" Prompt for a command to run | |
map <Leader>vp :VimuxPromptCommand<CR> | |
" Run last command executed by VimuxRunCommand | |
map <Leader>vl :VimuxRunLastCommand<CR> | |
" Inspect runner pane | |
map <Leader>vi :VimuxInspectRunner<CR> |
This file contains 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
# Example from http://mikepackdev.com/blog_posts/31-exhibit-vs-presenter | |
class Decorator < SimpleDelegator | |
end | |
class Car | |
def price | |
1_000_000 | |
end | |
end |
OlderNewer