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(){ | |
var http_get = function(url) { | |
var async = false; | |
var req = new XMLHttpRequest(); | |
req.open("GET", url, async); | |
req.withCredentials = true; | |
req.send(); | |
return req.responseText; | |
}; |
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
" Visual C++ 2010: rand.c | |
let s:RAND_MAX = 32767 | |
let s:seed = 0 | |
function! Srand(seed) | |
let s:seed = a:seed | |
endfunction |
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
" glibc-2.12.1: random_r.c | |
let s:RAND_MAX = 2147483647 | |
function! Srand(seed) | |
call s:srandom_r(a:seed, s:state) | |
endfunction | |
function! Rand() | |
return s:random_r(s:state) |
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
" v8 r6432: v8.cc | |
" Random number generator using George Marsaglia's MWC algorithm. | |
function! Srand(seed) | |
return s:rand(a:seed) | |
endfunction | |
function! Rand() | |
return s:rand() | |
endfunction |
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
// WSH | |
function zip(zipfile, files) { | |
var fso = new ActiveXObject("Scripting.FileSystemObject"); | |
var shell = new ActiveXObject("Shell.Application"); | |
var process_id = get_process_id(); | |
// create empty zip (right click -> new file -> compressed (zipped) folder) | |
var zip = fso.CreateTextFile(zipfile, 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
#!gvim -u | |
if has('vim_starting') | |
set nocompatible | |
set loadplugins | |
call feedkeys(":source " . expand('<sfile>:t') . "\<CR>") | |
finish | |
endif | |
set nocompatible |
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
# encoding: utf-8 | |
# require: http://code.google.com/p/gdata-python-client/ | |
from __future__ import print_function, division, unicode_literals, \ | |
absolute_import | |
import sys | |
import os | |
import codecs | |
import getpass |
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
#!gvim -u | |
set nocompatible | |
if has('vim_starting') | |
set loadplugins | |
call feedkeys(":source " . expand('<sfile>:t') . "\<CR>") | |
finish | |
endif |
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
# Webpage thumbnailer | |
# encoding: utf-8 | |
from __future__ import print_function, division, unicode_literals, \ | |
absolute_import | |
import sys | |
import argparse | |
from PySide.QtCore import Signal, Qt, QObject |
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
/* | |
* $ cc `pkg-config pangocairo --cflags --libs` pango-font-metrics-test.c | |
* | |
* $ LC_ALL=C ./a.out | |
* lang=default ascent=13.000000 descent=4.000000 | |
* lang=C ascent=13.000000 descent=4.000000 | |
* lang=ja-jp ascent=13.000000 descent=4.000000 | |
* | |
* $ LC_ALL=en_US.UTF-8 ./a.out | |
* lang=default ascent=13.000000 descent=4.000000 |
OlderNewer