Skip to content

Instantly share code, notes, and snippets.

# on server
if [ $TERM == "dumb" ] || [ $TERM == "vt102" ]; then
export TERM="xterm-color"
screen -RD
fi
# In irssi, /set term_charset big5
# Add client id_rsa.pub to your server .ssh/authorized_keys
# use ssh://yourId@yourserver from Nally to login ;)
@nrabinowitz
nrabinowitz / quantize.js
Created July 25, 2011 17:19
Javascript module for color quantization, based on Leptonica
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
@olivierlacan
olivierlacan / An_example.markdown
Created February 18, 2012 05:40 — forked from renz45/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.

class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
Security Alert - Please reset your npm registry account
==================================================
The security of the npm registry has just been upgraded. This corrects a known
flaw which led to the leakage of the password_sha and salt fields. The good
news is that the leak is plugged. The bad news is that it existed for quite a
while.
tl;dr
@linpc
linpc / gist:2389778
Created April 15, 2012 03:43
#osdc.tw 2012 irc log
--- Day changed 六 4月 14 2012
00:00 < hcchien> 算了,洗澡睡覺去。明天看緣份了 :D
00:18 < cls_bsd> ....
00:34 < jnlin> hcchien: 我有...
07:37 < darkx> 大家早安
08:36 < miyagawa> which building is the venue? http://www.sinica.edu.tw/as/map/asmap_c.html
08:39 < clkao_> miyagawa: 24
08:39 < miyagawa> thanks
08:39 < clkao_> hcchien: 為什麼我的 abstract 沒有出現
08:57 clkao_ is now known as clkao
@paulmillr
paulmillr / active.md
Last active June 10, 2024 18:10
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)
@yorkxin
yorkxin / avoid-jquery-when-possible.md
Created July 7, 2012 13:04
Avoid jQuery When Possible

Avoid jQuery When Possible

jQuery does good jobs when you're dealing with browser compatibility. But we're living in an age that fewer and fewer people use old-school browsers such as IE <= 7. With the growing of DOM APIs in modern browsers (including IE 8), most functions that jQuery provides are built-in natively.

When targeting only modern browsers, it is better to avoid using jQuery's backward-compatible features. Instead, use the native DOM API, which will make your web page run much faster than you might think (native C / C++ implementaion v.s. JavaScript).

If you're making a web page for iOS (e.g. UIWebView), you should use native DOM APIs because mobile Safari is not that old-school web browser; it supports lots of native DOM APIs.

If you're making a Chrome Extension, you should always use native APIs, not only because Chrome has almost the latest DOM APIs available, but this can also avoid performance issue and unnecessary memory occupation (each jQuery-driven extension needs a separate

@xdite
xdite / gist:3130468
Created July 17, 2012 16:31
7 月書單

電子書

@ypchen
ypchen / gist:3187714
Created July 27, 2012 12:33
Create a VM to Install Ubuntu 12.04 LTS 64-bit Server on XenServer/XCP
References:
[1] http://www.virtualzone.de/2012-05-01/ubuntu-12-04-on-citrix-xenserver-5-6/
[2] http://thetechshop.org/showthread.php?847-Citrix-Xenserver-Template-for-Ubuntu-12.04-and-the-weird-Rebooting-to-Read-Only-Mode
Steps:
1. New VM
* Two choices: