FOR IMMEDIATE RELEASE
## AppName vX.X does something interesting
AppName vX.X is on the App Store now, and features the following very interesting feature. This is a summary, so I'm focusing on the lead. Just something to make me want to read the rest. Done.
City, State/Country - [Company/Developer] has released AppName vX.X, available in the Mac App Store. AppName is/does [broad, general strokes]. [A few more specific points about who it's for and why it's of benefit to them].
New features!
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
var prettyTweetDate = function (tweetDateFromJSON) { | |
var createDate = Date.parse(tweetDateFromJSON), | |
tweetDate = new Date(createDate), | |
tweetDateNum = tweetDate.getDate(), | |
tweetHours = tweetDate.getHours(), | |
tweetAMPM = (tweetHours < 12) ? "AM" : "PM", | |
tweetDateSuffix = "", | |
prettyTweetDateString = "", | |
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; |
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
# parses out the current branch you're on. See: http://www.harukizaemon.com/2008/05/deploying-branches-with-capistrano.html | |
current_branch = `git branch`.match(/\* (\S+)\s/m)[1] | |
# use the branch specified as a param, then use the current branch. If all fails use master branch | |
set :branch, ENV['branch'] || current_branch || "master" # you can use the 'branch' parameter on deployment to specify the branch you wish to deploy |
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
# Just copy this line into your terminal | |
# Replace "clear ; rake" with whatever command(s) you want to time. | |
start=`date +'%s'` ; clear ; rake ; end=`date +'%s'`; echo \*\*\* Task took `expr $end - $start` seconds to run. | |
# Even better, add this to your ~/.bash_profile (or similar) file: | |
function timer() { | |
start=`date +'%s'`; | |
$@ | |
end=`date +'%s'`; | |
echo \*\*\* Task took `expr $end - $start` seconds to run.; |
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
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
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 | |
# 初期設定 | |
WORK=$HOME/Builds/build-essential | |
PREFIX=$HOME/local | |
export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" | |
# ソースコードのダウンロード | |
if [ ! -d $WORK/src ] ; then | |
mkdir -p $WORK/src |
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 ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
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 | |
# encoding: utf-8 | |
# == Synopsis | |
# Proof of concept using Fuzzy File Finder to locate a script to edit | |
# Searches a set of predefined locations for a fuzzy string | |
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease" | |
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease" | |
# | |
# Results are ranked and a menu is displayed with the most likely | |
# match at the top. Editor to be launched and directories to search |
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/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |
OlderNewer