Skip to content

Instantly share code, notes, and snippets.

View syu-id's full-sized avatar

Shaoyun Yu syu-id

  • The Hong Kong Polytechnic University
  • Hong Kong SAR
View GitHub Profile
@damianavila
damianavila / remove_output.py
Created April 3, 2013 22:05
Remove output from IPython notebook from the command line (dev version 1.0)
"""
Usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ]
Modified from remove_output by Minrk
"""
import sys
import io
import os
from IPython.nbformat.current import read, write
@amateurhuman
amateurhuman / gist:2005745
Created March 9, 2012 09:03
Installing Rubinius 2.0.0-dev with rbenv

Installing rbx-2.0.0-dev with Ruby 1.9 support using rbenv can be a tad tricky. This is what I did to get up and running, you'll need another version of ruby already installed as well as rake.

The basic outline:

  1. Clone Rubinius HEAD from github
  2. Configure installation for rbenv and 1.9 support
  3. Install Rubinius
  4. Configure your $PATH to use Rubinius gems
  5. Start using Rubinius
@pullmonkey
pullmonkey / gist:1361596
Created November 13, 2011 04:28
hello android tutorial in mirah/pindah
package com.example.android.hello_world;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
class HelloWorld < Activity
def onCreate(state:Bundle)
super state
tv = TextView.new(self)
@liwh
liwh / gist:894109
Created March 30, 2011 09:13
reload functon for zsh completion
#when we create new function or install new bin , the default zsh cant get the new completion for us,so we
#can add a new function for this problem,you can add the blow content in your .zshrc file
function reload() {
if [[ "$#*" -eq 0 ]]; then
test -r /etc/zsh/zsh-oli && . /etc/zsh/zsh-oli
test -r ~/.zshrc && . ~/.zshrc
return 0
else
local fn
for fn in $*; do