Skip to content

Instantly share code, notes, and snippets.

View netj's full-sized avatar

Jaeho Shin netj

View GitHub Profile
Algorithm Input Size Input Type Sorting Time #Compare #Access
quickSort 15 random 0.390538 572959 1519407
quickSort 16 random 0.788945 1199432 2991392
quickSort 17 random 1.763706 2644539 6656851
@netj
netj / .cshrc
Last active January 4, 2016 21:49
Automatically switch to bash from tcsh/csh. Place the snippet at the beginning of your `~/.cshrc` and `~/.login` files.
# XXX I use GNU BASH
# See: http://tuukka.iki.fi/linux/tweaks/bashovertcsh.html
# If this is login or some command is to be executed
# then change to a sane shell
if ($?loginsh || $?command) then
setenv SHELL /bin/bash
if($?loginsh) exec /bin/bash --login
exec /bin/bash -c "$command"
endif
From 839231516fe46ae5709658676ffa1d5463940e6b Mon Sep 17 00:00:00 2001
From: Jaeho Shin <netj@sparcs.org>
Date: Tue, 10 Sep 2013 19:14:07 +0900
Subject: [PATCH] Simon Wilkinson's gsskex patch for 6.2p2
Revised Simon's last patch for 5.7p1 [1] to apply cleanly to 6.2p2.
[1]: http://www.sxw.org.uk/computing/patches/openssh.html
---
ChangeLog.gssapi | 113 +++++++++++++++++++
From 0d949aa6169963ce5d6a55e15bcd9757e4c044eb Mon Sep 17 00:00:00 2001
From: Jaeho Shin <netj@sparcs.org>
Date: Tue, 10 Sep 2013 05:24:39 +0900
Subject: [PATCH] Simon Wilkinson's openssh gsskex patch for 6.2p2
Revised Simon's last patch for 5.7p1 [1] to apply cleanly to 6.2p2.
[1]: http://www.sxw.org.uk/computing/patches/openssh-5.7p1-gsskex-all-20110125.patch
---
@netj
netj / bookmarklet.js
Created August 3, 2013 16:36
Print Mint.com Transactions as seen — Use this to print or save as pdf your transactions organized in Mint.com as seen on the screen. Mint.com pages are normally mangled when you try to print without the help of this bookmarklet.
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript/
*/
var s = document.createElement("script");
s.src = "http://code.jquery.com/jquery-latest.min.js";
s.onload = function() {
$("link[rel='stylesheet']", document.head).attr("media", null);
$("#body-container .layer:last").css("display", "none");
print();
@netj
netj / bookmarklet.js
Created July 25, 2013 17:43
Download YouTube Subtitle — Run this bookmarklet on a YouTube video page to download its subtitle.
/* Created with YouScript Bookmarklet Editor
* http://netj.github.com/youscript/
*/
var m = location.href.match(/youtube.com\/watch\?(.+[&])?v=([^&]+)/);
if (m != null) {
var videoId = m[2];
function askLanguageAndDownload() {
var lang = "en";
// figure out the first available language for subtitle
// ==UserScript==
// @name Faviconize Google (nested icons)
// @namespace http://userscripts.ru/js/faviconize-google/
// @description Adds favicons to each link offered by Google search results.
// @include http://www.google.*/search?*
// @include https://www.google.*/search?*
// @include https://encrypted.google.*/search?*
// @include http://www.google.*/webhp*
// @include http://www.google.*/
// @include http://groups.google.*/groups/search?*
@netj
netj / _wordcloud.coffee
Last active December 18, 2015 04:49
wordcloud.coffee -- A phantomjs script for creating wordcloud images from command-line using Jason Davies' d3-cloud
#!/usr/bin/env phantomjs
# wordcloud.coffee -- A phantomjs script for creating wordcloud images from
# command-line using Jason Davies' d3-cloud
# Usage: keyword=wordle ./wordcloud.coffee [OUTPUTPATH]
# Creates a wordcloud image at the given path OUTPUTPATH.
# OUTPUTPATH can be either a .png or .pdf.
#
# See: Jason Davies' d3-cloud demo <http://www.jasondavies.com/wordcloud/>
#
# Author: Jaeho Shin <netj@cs.stanford.edu>
#!/bin/sh
Self=`readlink -f "$0"`
Here=`dirname "$Self"`
#
# Add extra JVM options here
#
OPTS="-Xms64m -Xmx256m"
tree e6819163e76264f778efe7fcb480d0f108d3aaf5
parent d2771a2c3e23bedf2018df1519b560873a0b35eb
author Jaeho Shin <netj@sparcs.org> Thu Dec 13 22:57:44 2012 -0800
committer Jaeho Shin <netj@sparcs.org> Thu Dec 13 22:57:44 2012 -0800
Fixed backslash handling in environment Change
diff --git a/ftplugin/latex-suite/envmacros.vim b/ftplugin/latex-suite/envmacros.vim
index edf97f7..3e1db37 100644