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 'rubygems' | |
require 'sequel' | |
require 'fileutils' | |
require 'cgi' | |
# NOTE: This converter requires Sequel and the MySQL gems. | |
# The MySQL gem can be difficult to install on OS X. Once you have MySQL | |
# installed, running the following commands should work: | |
# $ sudo gem install sequel | |
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config |
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 Dir | |
unless ARGV[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
blog_root = "/Users/jrk/proj/blog" |
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
<?php | |
/* Merge multiple RSS feeds with SimplePie | |
* | |
* Just modify the path to SimplePie and | |
* modify the $feeds array with the feeds you want | |
* | |
* You should probably also change the channel title, link and description, | |
* plus I added a CC license you may not want | |
* | |
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/ |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
# PROBLEM: when someone replies to you publicly in an IRC channel you may not be | |
# notified of it if you are away from your computer. The common format for public | |
# replies looks like this: | |
# | |
# <jchris> maxo_: yeah mine is way better | |
# | |
# SOLUTION: Sign up for notifo as both a supplier and a consumer, and install the | |
# notifo app on your smartphone. Execute this in cron every minute to have new | |
# mentions sent to your phone as push notifications. | |
# |
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
<?php | |
/* | |
Easy to use sms notifications from Notifo | |
Super quick hack by Harper - @harper - harper@nata2.org | |
First: | |
-------------- | |
Get Google-Voice-PHP-API: |
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
<?php | |
class Notifo_API { | |
const API_ROOT = 'https://api.notifo.com/'; | |
const API_VER = 'v1'; | |
protected $apiUsername; | |
protected $apiSecret; |
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
-- How to use: you can either run manually in applescript editor or open Automator | |
-- and select run applescript and paste this code where it tells you | |
-- then save that automation as an application. pro tip: go to sys prefs, accounts, login items | |
-- and add it there to launch on boot :) | |
-- provide the commands you want to open here. | |
-- want to run multiple in the same tab? just use a semicolon to separate the commands | |
-- these are just dummy commands. i usually launch redis-server, tail my error log, launch sass, and do a git status on my project dir |
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' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
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
RewriteEngine On | |
# Map http://henrik.nyh.se to /jekyll. | |
RewriteRule ^$ /jekyll/ [L] | |
# Map http://henrik.nyh.se/x to /jekyll/x unless there is a x in the web root. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !^/jekyll/ | |
RewriteRule ^(.*)$ /jekyll/$1 |
OlderNewer