Skip to content

Instantly share code, notes, and snippets.

View curist's full-sized avatar
😮

Chung-Yu Chang curist

😮
View GitHub Profile
@curist
curist / tmux.md
Last active August 29, 2015 14:26 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@curist
curist / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@curist
curist / .gitignore
Last active August 29, 2015 14:01
demo
node_modules/
module.exports = function (grunt) {
grunt.initConfig({
bower: {
dev: {
dest: '.tmp/public',
js_dest: '.tmp/public/js/components',
css_dest: '.tmp/public/styles/components',
options: {
packageSpecific: {
bootstrap: {
@curist
curist / blogpost.md
Last active December 11, 2015 20:18
gist-vim and this gist-driven-blog
@curist
curist / blogpost.md
Created November 22, 2012 06:11
foo bar

foo

  • some
  • list
  • items

bar

var i = 0;
@curist
curist / blogpost.md
Created November 20, 2012 06:30
Test as a new blog post

The Title

Shall we caching the gist API result at a seperate server?

That means when create a new blog post, user must also update the server file providing blog posts list, it seems will only calling the gist API one time, when the blog updated.

On the other hand, if we do this all by client side, heavier gist API calling, but creating blog post just meaning create new gist, named you_name_it.md, it's more DRY.

Let's see how the second approach performed, shall we?

$ diff .git-completion.sh /etc/bash_completion.d/git
292c292,296
< u="$(parse_git_dirty)"
---
> if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ]; then
> if [ -n "$(git ls-files --others --exclude-standard)" ]; then
> u="%"
> fi
> fi
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# zsh_themes:
# git/ruby: bira, dpoggi
# git only: takashiyoshida, duellj, candy
@curist
curist / github.js
Created June 25, 2012 09:47
github plugin for octopress using v3 API
var github = (function(){
function render(target, repos){
var i = 0, fragment = '', t = $(target)[0];
for(i = 0; i < repos.length; i++) {
fragment += '<li><a href="'+repos[i].url+'">'+repos[i].name+'</a><p>'+repos[i].description+'</p></li>';
}
t.innerHTML = fragment;
}
return {