Skip to content

Instantly share code, notes, and snippets.

View cshen's full-sized avatar
💭
I may be slow to respond.

Chunhua Shen cshen

💭
I may be slow to respond.
View GitHub Profile
@cshen
cshen / gist:32e38484439237b90a244560fce56308
Created October 22, 2023 13:45
com.googlecode.iterm2.plist
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowClipboardAccess</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>

Running emscripten on OS X

There are a number of additional dependencies required for getting things installed on OS X. Starting with a blank slate OS X machine, this is the process it takes:

# Install Xcode Command Line Tools

# Install Homebrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
@cshen
cshen / slides.md
Created September 11, 2013 16:44 — forked from aaronwolen/slides.md

% Title % Name % Date

My first slide

List

@cshen
cshen / gist:6492913
Created September 9, 2013 08:26
Installing CUDA Toolkit 5.5 on Ubuntu 12.10 Linux
Installing CUDA Toolkit 5.5 on Ubuntu 12.10 Linux
The following explains how to install CUDA Toolkit 5.5 on 64-bit Ubuntu 12.10 Linux. I have tested it on a self-assembled desktop with AMD Phenom II X4 CPU, 4GB RAM, 500GB hard drive, 650W power supply, and NVIDIA GeForce GTX 550 Ti graphics card. The instruction assumes you have the necessary CUDA compatible hardware support. Depending on your system configuration, your mileage may vary.
CUDA Repository
Retrieve the CUDA repository package for Ubuntu 12.10 from the CUDA download site and install it in a terminal.
$ sudo dpkg -i cuda-repo-ubuntu1210_5.5-0_amd64.deb
$ sudo apt-get update
Linux Kernel Header
Then you need to install the necessary Linux kernel headers.
@cshen
cshen / gist:6492856
Created September 9, 2013 08:21
Install Pylearn2 on a Ubuntu box
Install Pylearn2 on a Ubuntu box
https://github.com/lisa-lab/pylearn2
Assume that the default version of Python is 2.7.3
Tested on a machine with
- Linux 3.2.0-26-generic x86_64 GNU/Linux
- Ubuntu 12.04.2 LTS (Precise Pangolin)
@cshen
cshen / gist:6475293
Created September 7, 2013 12:46
install CUDA GPGPU on Ubuntu
Installing CUDA 5 on Ubuntu 12.04
copied from: http://sn0v.wordpress.com/2012/12/07/installing-cuda-5-on-ubuntu-12-04/
This is a follow up to my previous post which was aimed at CUDA 4.2 on Ubuntu 12.04. Although 12.10 is out, it’s not as stable as I would like it to be – I’d recommend sticking with Ubuntu 12.04 for development unless you have specific reasons to upgrade. With CUDA 5, Nvidia has greatly simplified the installation process for Linux, packaging the CUDA toolkit, the SDK and the development drivers all in a neat little package.
A few points before we begin though -
As always, a working CUDA installation requires a CUDA capable card.
@cshen
cshen / remgit.sh
Created September 7, 2013 03:03 — forked from ckalima/remgit.sh
# remgit.sh
# Creates a remote git repository from the current local directory
# Configuration
# Replace SSH_USERNAME, SSH_HOST, SSH_GIT_PATH with your details
USER=SSH_USERNAME
HOST=SSH_HOST
GIT_PATH=SSH_GIT_PATH
REPO=${PWD##*/}
/**
The following example uses this function to calculate the matrix-vector product using
a blas/lapack routine:
/ 3 1 3 \ / -1 \
| 1 5 9 | * | -1 |.
\ 2 6 5 / \ 1 /
D2 version based on the C version at http://www.seehuhn.de/pages/linear
"""
cymex.pyx
=========
This file shows how to bootstrap a C extension for MATLAB with just Cython,
and no C stubs. This strategy probably would work for extending other
languages as well, with C/Python.
It is necessary to redirect MATLAB's libgfortran link as found in
$MATLAB/sys/os/glnxa64/libgfortran.so.3 to the one to which your NumPy's