Skip to content

Instantly share code, notes, and snippets.

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@jexchan
jexchan / gist:5037517
Last active April 23, 2024 08:18 — forked from jrochkind/gist:2161449
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@jexchan
jexchan / mirror_internal.md
Created April 1, 2012 14:56
Mirror sites for Linux
@jexchan
jexchan / TeXIt.tex
Last active August 4, 2023 05:55 — forked from arcthur/TeXIt.tex
Latex with Chinese Support
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% 以上设定默认使用 XeLaTeX 编译,并指定 Unicode 编码,供 TeXShop 自动识别
% XeLaTeX 示例
\documentclass[12pt]{article}
% XeTeX 配合 fontspec 可以非常方便的设置字体
@jexchan
jexchan / InertialBounce.jsx
Created April 23, 2018 11:55 — forked from animoplex/InertialBounce.jsx
Inertial Bounce - After Effects Expression by Animoplex
// Inertial Bounce - Created by Animoplex: www.animoplex.com
// Original Version: http://www.graymachine.com/top-5-effects-expressions/
// Modified expression for a smoother bounce effect and easier editing. Use this on any property with two keyframes to get a nice bounce effect that is based on velocity of the value change. Perfect for a scale from 0 to 100 or a speedy rotation that needs some extra life. Adjust amp, freq and decay values to tweak the effect. Amp is intensity, freq is bounces per second, and decay is the speed of decay, slow to fast.
// Full Tutorial: https://www.youtube.com/watch?v=653lxeVIyoo
amp = 5.0; freq = 2.0; decay = 4.0;
n = 0;
if (numKeys > 0) {
n = nearestKey(time).index;
@jexchan
jexchan / frontendDevlopmentBookmarks.md
Created June 22, 2013 11:03 — forked from dypsilon/frontendDevlopmentBookmarks.md
Frontend Development Resources
@jexchan
jexchan / example02.py
Last active December 20, 2019 09:29
Python Turtle 精讲 example02
#定义画多边形函数
import turtle
t = turtle.Turtle() #命名一个简化的名称
t.shape('turtle') #设定小光海龟来画图
# t.speed(0)
def polygon(length, sides):
for i in range(sides):
t.forward(length)
@jexchan
jexchan / osx setting shell scripts
Last active September 8, 2019 11:21 — forked from brandonb927/osx-for-hackers.sh
OSX Setting Shell Scripts
# ~/.osx — http://mths.be/osx
# root check
if [[ $EUID -ne 0 ]]; then
echo "################################";
echo "## YOU ARE NOT RUNNING AS ROOT #";
echo "################################";
echo "#";
echo "# USAGE: sudo $0";
exit;
@jexchan
jexchan / .tmux.conf
Created May 12, 2014 09:47
my tmux configuration
unbind C-b
set -g prefix C-a
setw -g mode-keys vi
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "reloaded config file!"
@jexchan
jexchan / README.md
Created December 1, 2013 23:58 — forked from dergachev/README.md

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM