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 script takes the values for enclosure post metadata and adds the length | |
-- and type fields, if they don't exist. | |
-- | |
-- The REGEXP /\n[0-9]+\n/ is meant to look for the length field. If it's | |
-- missing, then the value needs to be patched. | |
SET @type := 'audio/mpeg'; | |
SET @length := 0; |
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 'rbconfig' | |
require 'fileutils' | |
RSPEC2 = 'https://github.com/tooky/vim-ruby/blob/6f7656892806a2a95fb98a562f6531e27e7398c4/compiler/rspec2.vim' | |
directory 'compiler' | |
vim_plugin_task 'rspec2' do | |
if !File.directory?('compiler') | |
Dir.mkdir('compiler') |
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
#! /usr/bin/env bash | |
# install local janus config | |
curl -L https://gist.github.com/raw/1166018/bfba67168e2f2b74fa7d7debf9ed13ca798429f1/.janus.rake > ~/.janus.rake | |
# install janus plugins for vim | |
curl https://raw.github.com/carlhuda/janus/master/bootstrap.sh -o - | sh | |
# install rvm | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) |
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 'etc' | |
require 'fileutils' | |
require 'vagrant' | |
task :default => :usage | |
task :usage do | |
puts "You forgot to tell the computer what to do; try one of these commands:" |
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
# The input. | |
INPUT = 'The quick brown fox jumped over the lazy dogs. ABCDEF' | |
# Create a hash that returns an empty Array for missing item accesses. | |
len_index = Hash.new do |hash, key| | |
hash[key] = [] | |
end | |
# Split the input and store each word in the hash, keyed by the length of 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
require 'etc' | |
require 'fileutils' | |
require 'vagrant' | |
task :default => :usage | |
task :usage do | |
puts "You forgot to tell the computer what to do; try one of these commands:" |
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' | |
GVIMRC = <<EOF | |
" undefine all the custom NERDTree-aware commands. | |
" From https://github.com/carlhuda/janus/issues/174 | |
cunabbrev cd |
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
#!/usr/bin/env python | |
"""\ | |
A short explanation of dependency injection and how to use to make testing | |
easier. | |
Maybe this should be a mocking guide, because everything's going to be a mock | |
object. |
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 file should be name omg.ptl. | |
class PageTemplate(object): | |
def _corner [html] (self): | |
'This gets output too. What fun!<br />\n' | |
if self._project(): | |
return self._project().upper() | |
else: | |
'<font size="-1">Linguistic Atlas Projects</font>' |
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
class Freq | |
include ActiveModel::Validations | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
attr_accessor :input_text | |
validates :input_text, :presence => true | |
def initialize(attributes = {}) |
OlderNewer