Skip to content

Instantly share code, notes, and snippets.

#!/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'
@dqaria
dqaria / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../ace-element/ace-element.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@dqaria
dqaria / charlesLocalMapGenerater.js
Created June 13, 2014 03:13
Genreate Charles Local Mapping Proxy File
#! /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'
;
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;
-- 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"
@dqaria
dqaria / .slate
Created March 14, 2013 15:01 — forked from bsag/.slate
# 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
#!/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
@dqaria
dqaria / migrate.rb
Created February 10, 2013 12:51 — forked from zellux/migrate.rb
# 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'
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'
@dqaria
dqaria / newOBC.sh
Created January 29, 2013 15:14
Objective-C init Alfred Extension
#请确认你装了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://git@bitbucket.org/username/{query}.git;
git push -u origin --all;