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/perl | |
# blog: a utility to run a weblog | |
# | |
# Copyright (C) 1999 Michael D. Ivey <ivey@gweezlebur.com> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
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 'fileutils' | |
class Jekyll < Thor | |
include FileUtils | |
method_options :format => :optional | |
def draft(name) | |
format = options[:format] || "markdown" | |
slug = name.downcase.gsub(/ +/,'-').gsub(/[^-\w]/,'').sub(/-+$/,'') | |
filename = slug + ".#{format}" |
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
// other window | |
slate.bind('p:ctrl,cmd,alt', function(win) { | |
var current = slate.screen().id(); | |
var count = slate.screenCount() - 1; | |
var target = current + 1; | |
if (target > count) { | |
target = 0; | |
} | |
win.doOperation(slate.operation("throw", { | |
"screen": target, |
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
from math import floor | |
from datetime import datetime, timedelta | |
from time import mktime | |
import plugins | |
def _initialise(bot): | |
plugins.register_handler(_handle_cp_action) | |
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
config_path = File.expand_path("~/.nexus_cli") | |
config = File.exists?(config_path) ? YAML::load_file(config_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
(defun intelligent-close () | |
"quit a frame the same way no matter what kind of frame you are on" | |
(interactive) | |
(if (eq (car (visible-frame-list)) (selected-frame)) | |
;;for parent/master frame... | |
(if (> (length (visible-frame-list)) 1) | |
;;close a parent with children present | |
(delete-frame (selected-frame)) |
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
namenode = search(:node, "chef_environment:#{node.chef_environment} AND role:hadoop_namenode_server").first | |
vars = { :options => node[:hadoop][:core_site] } | |
vars[:namenode_ip] = namenode[:ipaddress] if namenode | |
template "/etc/hadoop-#{node[:hadoop][:version]}/conf.chef/core-site.xml" do | |
mode 0750 | |
owner "hdfs" | |
group "hdfs" | |
action :create |
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
# Paul Rudd isn't a douchebag | |
# | |
# load up celery man please | |
# can i get a printout of oyster smiling? | |
# do we have any new sequences? | |
# can i see a flarhgunnstow? | |
module.exports = (robot) -> | |
robot.respond /load up celery man please/i, (msg) -> | |
msg.send "http://www.simpleindustries.com/wp-content/uploads/2010/05/paul_sequence1.png" |
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
# http://twistedmind.com/bundle-exec-bash-shortcut | |
bundle_commands=( rake spec rspec cucumber cap watchr rails rackup ) | |
function run_bundler_cmd () { | |
if [ -e ./Gemfile ]; then | |
echo "bundle exec $@" | |
bundle exec $@ | |
else | |
echo "$@" | |
$@ | |
fi |
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
<ivey> it's a nice photo sharing site, but has just enough community | |
stuff (stars, re-posting) and lightweight groups that it's | |
hitting the sweet spot | |
<ivey> and there's no sense of "only post your own stuff" like flickr | |
<ivey> so when you see something funny or pretty or awesome or weird, | |
you can toss it up on mlkshk |
NewerOlder