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 | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
<link rel="import" href="../ace-element/ace-element.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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 node | |
var fs = require("fs") | |
, program = require('commander') | |
, prompt = require('prompt') | |
, path = require("path") | |
, first_root = process.cwd() | |
, root = process.cwd() | |
, out_file = 'MapLocal.xml' | |
; |
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
cd ~/rails/; | |
rails new {query}; | |
#将capistrano代码复制过来 | |
#capistrano代码请自行配置 http://railscasts.com/episodes/337-capistrano-recipes | |
cp -R ~/rails/ToolBox/capistrano/recipes ~/rails/{query}/config/; | |
cp ~/rails/ToolBox/capistrano/deploy.rb ~/rails/{query}/config/; | |
#在deploy.rb中设置应用名为APPLICATION_NAME | |
sed 's/APPLICATION_NAME/{query}/g' ~/rails/{query}/config/deploy.rb > ~/rails/{query}/config/deploy.rb; | |
#配置pow,如未使用可删除 | |
cd ~/.pow; |
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
-- Move to Space 1 | |
tell application "System Events" to keystroke (key code 105) | |
delay 1 | |
tell application "Moom" to arrange windows according to snapshot named "Development Panel" | |
-- Move to Space 2 | |
tell application "System Events" to keystroke (key code 107) | |
delay 1 | |
tell application "Moom" to arrange windows according to snapshot named "Communication Panel" |
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
# My slate file | |
# 10-02-2013 | |
# Basic mappings and bindings for moving screens around | |
# I have set up my right command key to trigger ctrl+alt+shift+cmd | |
# see http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#hyper for details | |
config defaultToCurrentScreen true | |
config windowHintsShowIcons true | |
config windowHintsIgnoreHiddenWindows false | |
config windowHintsSpread 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
#!/bin/bash | |
# | |
# requirements: | |
# - ImageMagick: http://www.imagemagick.org/script/binary-releases.php#macosx | |
# - image_optim: https://github.com/toy/image_optim | |
# - a scp supported host with ssh key paired | |
# setting up the enviroment | |
export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$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
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'fileutils' | |
require 'time' | |
require 'ya2yaml' | |
require File.join(File.dirname(__FILE__), "downmark_it") | |
require 'nokogiri' | |
require 'cgi' |
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
platform :ios,'6.0' | |
#toolkit | |
dependency 'MBProgressHUD' # An activity indicator that can be added to your views. | |
# dependency 'Nimbus' # A comprehensive toolkit of modules aimed at replacing Three20. | |
dependency 'SSToolkit' # A collection of well-documented iOS classes for making life easier. | |
#networking | |
dependency 'AFNetworking' # Network connectivity and response handling. | |
dependency 'Reachability' # Network access detection. | |
# dependency 'ShareKit' |
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
#请确认你装了cocoapods | |
#在我的另一个gist里提供了我精心编的Podfile哦 | |
cp ~/iOS/ToolBox/Podfile ~/iOS/{query}/Podfile; | |
cd ~/iOS/{query}/; | |
pod install; | |
curl -u username:password -d "name={query}&scm=git&is_private=true&language=objective-c" https://api.bitbucket.org/1.0/repositories | |
git add .; | |
git commit -m "init project"; | |
git remote add origin ssh://[email protected]/username/{query}.git; | |
git push -u origin --all; |
NewerOlder