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
Fooo |
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 | |
# Made by Pieter de Bie <[email protected]> | |
# Based on a "Pastie" task by someone | |
require "tempfile" | |
GIST_URL = 'http://gist.github.com/gists' | |
GIST_LOGIN_URL = 'https://gist.github.com/session' | |
USERNAME = "pieter" | |
PASSWORD = "xxxx" |
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
foo |
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
gem 'dm-core' | |
require 'dm-core' | |
APP_ROOT = File.expand_path(File.dirname(__FILE__)) | |
# Database stuff | |
DataMapper.setup(:default, "sqlite3:#{APP_ROOT}/tezeta.db") | |
class User | |
include DataMapper::Resource | |
property :id, Integer, :serial => true |
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
privat { | |
# Do we know that extension? | |
hangup unless @user = User.first(:extension => extension) | |
# Add to call log | |
@user.call_logs << CallLog.new(:type => 'incoming', :caller_id => callerid, :created_at => Time.now) | |
dial(@user.node) | |
@user.save | |
} |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1='\[\e[31;1m\]\u@\h:\w$(parse_git_branch)$ \[\e[0m\]' | |
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
Once upon a time it suddenly decided to flip backwards, and there went Time |
OlderNewer