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
# Fish git prompt | |
set __fish_git_prompt_showdirtystate 'yes' | |
set __fish_git_prompt_showstashstate 'yes' | |
set __fish_git_prompt_showupstream 'yes' | |
set __fish_git_prompt_color_branch yellow | |
# Status Chars | |
set __fish_git_prompt_char_dirtystate '✎ ' | |
set __fish_git_prompt_char_stagedstate '☑ ' | |
set __fish_git_prompt_char_stashstate '☄ ' |
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
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
// Override point for customization after app launch | |
[self createEditableCopyOfDatabaseIfNeeded]; | |
UIView *backgroundView = [[UIView alloc] initWithFrame: window.frame]; | |
backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]]; | |
[window addSubview:backgroundView]; | |
[backgroundView release]; | |
[window addSubview:tabcontroller.view]; |
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 with a formatted date and a boolean | |
xml.instruct! | |
xml.declare! :DOCTYPE, :plist, :PUBLIC, "-//Apple Computer//DTD PLIST 1.0//EN", "http://www.apple.com/DTDs/PropertyList-1.0.dtd" | |
xml.plist("version" => 1.0) do |plist| | |
plist.dict do |wrapper| | |
@occasions.each do |occasion| | |
wrapper.key occasion.id | |
wrapper.dict do |dict| | |
dict.key 'ccd_remote_id' # required id from the system of record (rails db in this case) |
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
/* | |
Variable Grid System. | |
Learn more ~ http://www.spry-soft.com/grids/ | |
Based on 960 Grid System - http://960.gs/ | |
Licensed under GPL and MIT. | |
*/ | |
/* Containers | |
----------------------------------------------------------------------------------------------------*/ |
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 'active_support' | |
DEPLOY_CONFIG = YAML::load(File.open("config/deploy.yml")) | |
default_run_options[:pty] = true | |
# | |
# General Deployment settings | |
# | |
set :application, DEPLOY_CONFIG['application'] | |
set :repository, DEPLOY_CONFIG['repository'] || 'master' | |
set :scm, :git |
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
public void onClick(View v) { | |
Intent i; | |
switch (v.getId()) { | |
.... | |
case R.id.east_map_button: | |
i = new Intent(this, MapZoom.class); | |
i.putExtra(MAP_URL, "file:///android_res/drawable/east.png"); | |
startActivity(i); |
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.ru for solr reverse_proxy | |
# test me with $ rackup solrrp.ru | |
# or just do most of this in you web sever config | |
require 'server' | |
require 'rack/reverse_proxy' | |
require 'my_custom_logger' | |
# catch and log requests | |
use MyCustomLogger # some code you wrote that logs info about results on the /search* endpoint |
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 Die | |
attr_reader :d, :face, :bonus, :modifier | |
def initialize(d) | |
parse_d(d) | |
@face = roll | |
if @d == @face | |
@bonus = Die.new(d) | |
end | |
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
#!/usr/bin/ruby | |
# This script installs to /usr/local only. To install elsewhere you can just | |
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like. | |
module Tty extend self | |
def blue; bold 34; end | |
def white; bold 39; end | |
def red; underline 31; end | |
def reset; escape 0; end | |
def bold n; escape "1;#{n}" 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
for INSTANCE in `cat ~/instance_addr_list` | |
do | |
echo '------------' | |
echo $INSTANCE | |
echo '------------' | |
for i in 1 2 | |
do | |
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=false $INSTANCE "nohup sh ~/bin/image-node/do-task.sh &> /dev/null &" | |
done | |
done |
OlderNewer