Skip to content

Instantly share code, notes, and snippets.

import java.util.List;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.codehaus.jackson.map.Module;
import org.junit.After;
import org.junit.Before;
import com.google.common.collect.Lists;
@eightysteele
eightysteele / gist:1408088
Created November 30, 2011 04:59
Install pyhdf on Ubuntu Oneric
wget -c http://ufpr.dl.sourceforge.net/project/pysclint/pyhdf/0.8.3/pyhdf-0.8.3.tar.gz
tar zxvf pyhdf-0.8.3.tar.gz
cd pyhdf-0.8.3
sudo apt-get install libhdf4-dev
sudo apt-get install python2.6-dev
cd pyhdf
sudo apt-get install swig
swig -python hdfext.i
cd ..
export INCLUDE_DIRS=/usr/include/hdf
@miyamuko
miyamuko / cairo-build-mingw.sh
Created September 9, 2010 14:48
cairo install script for MinGW.
#
# cairo install script for MinGW.
#
# - zlib 1.2.5
# - libpng 1.4.3
# - pixman 0.18.4
# - cairo 1.10.0
#
@westonruter
westonruter / config.diff
Created February 27, 2011 20:48
Using colordiff for my svn diff command (set in ~/.subversion/config)
@@ -28,7 +28,7 @@
### Set diff-cmd to the absolute path of your 'diff' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff implementation.
-# diff-cmd = diff_program (diff, gdiff, etc.)
+diff-cmd = colordiff
### Set diff3-cmd to the absolute path of your 'diff3' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff3 implementation.
@yoggy
yoggy / uuid_test.c
Created January 8, 2013 11:19
libuuid sample program
//
// libuuid sample program
//
// library install for debian
// $ sudo apt-get install uuid-dev
//
// compile
// $ gcc uuid_test.c -luuid -o uuid_test
//
#include <stdio.h>
@martinkunev
martinkunev / heap.c
Created November 14, 2011 22:52
Binary heap (C implementation)
// WARNING: Requires C99 compatible compiler
#include <unistd.h>
#include <stdlib.h>
#include "heap.h"
#define CMP(a, b) ((a) >= (b))
static const unsigned int base_size = 4;
@benbalter
benbalter / excerpt.md
Last active December 15, 2022 20:28
Example of how to use Jekyll's `excerpt` tag.

If your post looked something like:

# Awesome Blog Post

Here is an example post to show how to use the new `excerpt` tag.

The excerpt tag provides a quick and easy way to tease a post by exposing only the first paragraph such as on a blog index page.
@bazted
bazted / build.gradle
Created January 16, 2017 08:29
List all gradle sourceSets and their files
//add this in the end of your build.gradle
sourceSets.each {
println(it)
it.allSource.each {
println(it)
}
}
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@sonots
sonots / nvvp.md
Last active April 24, 2024 13:54
How to use NVIDIA profiler

Usually, located at /usr/local/cuda/bin

Non-Visual Profiler

$ nvprof python train_mnist.py

I prefer to use --print-gpu-trace.