🧛♂️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery | |
set nocompatible | |
set autoindent | |
set tabstop=2 | |
set showmatch | |
set vb t_vb= | |
set ruler | |
set nohls | |
set incsearch | |
syntax on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Refs: | |
* http://nootn.com/blog/Develop/35/ | |
* http://soledadpenades.com/2007/05/17/arrayindexof-in-internet-explorer/#comment-57199 | |
* http://ecma262-5.com/ELS5_HTML.htm#Section_15.4.4.14 | |
*/ | |
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function(el, index) { | |
var n = this.length >>> 0, i = ~~index; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::-moz-selection { | |
background-color: #19B8E6; | |
color: white; | |
text-shadow: none; | |
} | |
::selection { | |
background-color: #19B8E6; | |
color: white; | |
text-shadow: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Markdown -- A text-to-HTML conversion tool for web writers | |
# | |
# Copyright (c) 2004 John Gruber | |
# <http://daringfireball.net/projects/markdown/> | |
# | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.hinter_wrapper { | |
outline: 1px solid gray; | |
text-align: center; | |
width: 800px; | |
margin: auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 302 Found | |
Location: http://www.google.com/ | |
Cache-Control: private | |
Content-Type: text/html; charset=UTF-8 | |
X-Content-Type-Options: nosniff | |
Date: Fri, 09 Dec 2011 02:23:49 GMT | |
Server: sffe | |
Content-Length: 219 | |
X-XSS-Protection: 1; mode=block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 10:44上午 ] [ nos@NosMacbookPro:~ ] | |
$ curl ifconfig.me | |
123.114.32.48 # I am in Beijing, China right now.. | |
[ 10:45上午 ] [ nos@NosMacbookPro:~ ] | |
$ curl -i pubnub.com | |
HTTP/1.1 301 Moved Permanently | |
Server: nginx/0.7.67 | |
Date: Fri, 09 Dec 2011 02:46:06 GMT | |
Content-Type: text/html | |
Content-Length: 185 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_browser_info() | |
{ | |
var ua = navigator.userAgent.toLowerCase(); | |
var browser = ''; | |
var version = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array = [1, 1, 1, 1, 2, 2, 3, 3, 4, 1, 2, 3, 2, 1, 2, 1, 8, 4, 0, 5] | |
def bubblesort(array): | |
f = lambda x, y, _sorted: [x, y, _sorted] if x < y else [y, x, False] | |
for i in range(len(array) - 1): | |
_sorted = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import time | |
array = [] | |
for i in range(1000000): | |
array.append(random.randint(1, 100)) | |
def q_sort(nums): | |
if not nums: | |
return [] |
OlderNewer