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
d = document; | |
function p(n){return n.parentNode} | |
function $(x){return d.getElementById(x)} | |
function $t(x){return d.getElementsByTagName(x)} | |
function $c(x){return d.getElementsByClassName(x)} | |
function $r(n){p(n).removeChild(n)} | |
if (d.location.href.indexOf('mobile.books24x7') != -1 ) { | |
while($t('link').length != 1) { | |
l = $t('link'); | |
for(var i = 0; i < l.length; i++) if (l[i].href.indexOf('grison') == -1) $r(l[i]); |
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
# npm update -g -ddd | |
npm info it worked if it ends with ok | |
npm verb cli [ 'node', | |
npm verb cli '/usr/local/bin/npm', | |
npm verb cli 'update', | |
npm verb cli '-g', | |
npm verb cli '-ddd' ] | |
npm info using npm@1.0.27 | |
npm info using node@v0.5.5 | |
npm verb /usr/local/bin/node node symlink |
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
#!/bin/bash | |
# filename: transmission_cli_manager.sh | |
# author: Dan Merschi | |
# date: 2009-01-17 (0.69 rev.4260) | |
# update: 2009-03-01 (0.69 rev 4403) | |
# purpose: A fast and easy solution(script) to manage Transmission daemon via transmission-remote client | |
# source: http://sourceforge.net/apps/phpbb/freenas/viewtopic.php?f=12&t=822 | |
# | |
if [ -z "$(pgrep transmission-daemon)" ] ;then echo Transmission not running, abort.; exit 3; fi | |
eval $( ps axww | \ |
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
class AsyncEventEmitter | |
constructor : () -> | |
@_dict = {} | |
emit : (eventName, args...) -> | |
if @_dict[eventName]? | |
(process.nextTick () -> | |
callback.apply null, args) for callback in @_dict[eventName] | |
once : (eventName, callback) -> |
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
var MAX = 1E8; | |
function out(i, final, res) { | |
res.end(i + "+1 " + MAX + " times = " + final + "\n"); | |
} | |
var inc_sync = function (i, callback) { | |
var k = 0, x = i; | |
for(var k = 0; k < MAX; k++) | |
x += 1; | |
callback(i, x); |
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
... | |
private object FormatObject(object value) | |
{ | |
if (this.ControlAtDesignTime()) | |
return value; | |
System.Type propertyType = this.propInfo.PropertyType; | |
if (this.formattingEnabled) | |
{ | |
ConvertEventArgs cevent = new ConvertEventArgs(value, propertyType); |
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
let SessionLoad = 1 | |
if &cp | set nocp | endif | |
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 | |
let v:this_session=expand("<sfile>:p") | |
silent only | |
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' | |
let s:wipebuf = bufnr('%') | |
endif | |
set shortmess=aoO | |
badd +2 C:\temp\file1.txt |
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
#SingleInstance force | |
; Revert mouse direction | |
#MaxHotkeysPerInterval 400 | |
WheelDown::WheelUp | |
WheelUp::WheelDown | |
; Remap capslock to control | |
Capslock::Ctrl | |
; Alternative - get a Win key back | |
; Capslock::Win |
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
if exists("g:loaded_nerdtree_custom_maps") | |
finish | |
endif | |
let g:loaded_nerdtree_custom_maps = 1 | |
"adds a new keymapping on 'gT' that opens the selected file in a bg tab and | |
"closes the tree | |
call NERDTreeAddKeyMap({ | |
\ 'scope': 'FileNode', | |
\ 'key': 'T', |
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
void Main() | |
{ | |
var co = new Company { Id = 1, Name = "Moof Inc." }; | |
var clarus = new Contact { Id = 1, Name = "Clarus" }; | |
var mark = new Contact { Id = 2, Name = "Mark" }; | |
co.AddContact(clarus); | |
co.AddContact(mark); | |
co.MainContact = clarus; | |
// Attempt #1: Straight up, no converter |
OlderNewer