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 Data.List (intercalate) | |
data Tree t = Leaf t | Branch [Tree t] | |
instance Show t => Show (Tree t) where | |
show (Leaf n) = show n | |
show (Branch ts) = "[" ++ (intercalate "," $ map show ts) ++ "]" | |
indiciesFrom n = | |
let f 0 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
* Run like this: `rm -r /tmp/foo; hg init /tmp/foo; python test.py` | |
* 2be2a is the parent of http://selenic.com/hg/rev/9f94358 | |
* f94ea is the tip of stable as of writing | |
* Running hg verify after running the test script yields the output seen in verify.f94ea.output |
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
--- /cygdrive/c/code/build_exe_mine.py 2012-05-01 10:56:41.466200000 -0400 | |
+++ /cygdrive/c/Python27-64/Lib/site-packages/py2exe/build_exe.py 2012-05-01 11:11:08.271068800 -0400 | |
@@ -1514,7 +1514,7 @@ | |
# "Indirect" byte-compilation: write a temporary script and then | |
# run it with the appropriate flags. | |
- if not direct and False: | |
+ if not direct: | |
from tempfile import mktemp |
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 Check-Resolve { | |
hg resolve -l | ForEach-Object { Select-String '<<<' $_.Split()[1] } | |
} | |
Set-Alias cr Check-Resolve | |
function Grep-Service($regex) { | |
Get-Service | ? { $_.Name -match $regex } | |
} |
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
[DataContract] | |
public class Search { | |
[DataMember("movies")] | |
public List<Movies> Movies { get; set; } | |
[DataMember("link_template")] | |
public string LinkTemplate { get; set; } | |
[DataMember("links")] | |
public Links Links { get; set; } |
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
PS C:\code\elasticsearch-opengrok> mvn archetype:generate | |
[INFO] Scanning for projects... | |
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom | |
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom (5 KB at 9.6 KB/sec) | |
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/18/maven-plugins-18.pom | |
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/18/maven-plugins-18.pom (13 KB at 27.4 KB/sec) | |
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/16/maven-parent-16.pom | |
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/16/maven-parent-16.pom (23 KB at 46.3 KB/sec) | |
Downloading: http://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom | |
Downloaded: http://repo1.maven.org/maven2/org/apache/apache/7/apache-7.pom (15 KB at 39.5 KB/sec) |
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/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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
bad friends | |
----------- | |
chris | |
good friends | |
------------ | |
everybody else |
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/env python | |
import gzip | |
import urllib2 | |
from cStringIO import StringIO | |
from lxml import etree, html | |
from lxml.cssselect import CSSSelector | |
opener = urllib2.build_opener() | |
opener.addheaders = [('User-agent', 'Mozilla/5.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
# Report 7 - Session 5 - Time Profile of game | |
SharkProfileViewer | |
# Generated from the visible portion of the outline view | |
+ 97.9%, start, game | |
| + 97.9%, main, game | |
| | + 86.5%, GLUTMainLoop(), game | |
| | | + 86.5%, glutMainLoop, GLUT | |
| | | | + 86.5%, -[GLUTApplication run], GLUT | |
| | | | | + 86.3%, __glutProcessWorkEvents, GLUT | |
| | | | | | + 86.3%, processWindowWorkList, GLUT |