This file contains hidden or 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
Collection.metaClass.collectWithIndex = { yield -> | |
def collected = [] | |
delegate.eachWithIndex { listItem, index -> | |
collected << yield(listItem, index) | |
} | |
return collected | |
} | |
/* |
This file contains hidden or 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 csv | |
def make_link(G, node1, node2): | |
if node1 not in G: | |
G[node1] = set() | |
G[node1].add(node2) | |
if node2 not in G: | |
G[node2] = set() | |
G[node2].add(node1) | |
return G |
This file contains hidden or 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
/* | |
* Commonly used utility functions for Greasemonkey scripts | |
* | |
* Copyright © 2010, Yuri Sakhno | |
*/ | |
// version 1.1 | |
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function(elt, from) { | |
var len = this.length >>> 0; |
This file contains hidden or 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
/* | |
* Images for Another Widescreen VKontakte script | |
* | |
* Copyright © 2010, Yuri Sakhno | |
*/ | |
// version 1.0 | |
var emptyImageData="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="; | |
var backgroundImageData="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAApCAMAAABjq9sOAAAABGdBTUEAAK/INwWK6QAAABl"+ | |
"0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABvUExURUdznSRTfxdIdERvlzRijDpnkUt1ny9dhilYg013oCZVgBVGckZynEt2nz9rlB1P"+ | |
"ejFeiSFQfEl0nBtLd0NwmTJgijZjjhZHczllkBxOeRlJdUh0nkVxmzxpk0BtlStahUJumCJSfShXghVFck55oZ5vss4AAABhSURBVHjavMrHAYIAAMDAA"+ |
This file contains hidden or 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
@ECHO OFF | |
REM | |
REM Automatic Grails Version Selector v1.0 | |
REM | |
REM Description: | |
REM Automatically selects version of Grails to run based either | |
REM on context, environment variable, or command line argument. | |
REM | |
REM Copyright © 2010, Componentix (http://www.componentix.com/) |