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
#!/usr/bin/python | |
import sys, subprocess | |
def main(args=sys.argv): | |
if len(args) < 2: | |
print "Usage: %s <command>" % (args[0]) | |
exit 1 | |
while True: | |
try: line = raw_input(None) |
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
#!/bin/sh | |
apt-get install compizconfig-settings-manager compiz-fusion-plugins-extra xautomation | |
gconftool-2 --set --type list --list-type string /apps/compiz/general/allscreens/options/active_plugins [grid,commands] | |
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_1 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_4' 'keyup Control_L' 'keyup Alt_L'" | |
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_2 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_6' 'keyup Control_L' 'keyup Alt_L'" | |
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_3 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_7' 'keyup Control_L' 'keyup Alt_L'" | |
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_4 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_9' 'keyup Control_L' 'keyup Alt_L'" | |
gconftool-2 --set --type string /apps/metacity/keybinding_commands/command_5 "xte 'keydown Control_L' 'keydown Alt_L' 'key KP_1' 'keyup Control_L' 'keyup Alt_L |
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
#!/bin/bash | |
shingle_size=4 | |
feature_count=1024 | |
if [[ ! -d $1 || ! -d $2 ]]; then | |
echo "Usage: <dir1> <dir2>" | |
exit 1 | |
fi; | |
# make sure we don't simhash simhash files |
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
// Input snippet of JSON-Schema: | |
{ | |
"name": "email" | |
"type":"object", | |
"properties":{ | |
"type":{"type":"string"}, | |
"value":{"type":"string","format":"email"} | |
} | |
} |
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 java.io.File; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.NoSuchElementException; | |
public class Paths implements Iterable<File> { |
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
/* | |
* Original code from: | |
* Mattias Fagerlund | |
* http://lotsacode.wordpress.com/2010/03/05/singularization-pluralization-in-c/ | |
* Matt Grande | |
* http://mattgrande.wordpress.com/2009/10/28/pluralization-helper-for-c/ | |
* | |
* Converted Java by Mark Renouf | |
*/ |
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
package com.bitgrind.text; | |
import org.junit.experimental.theories.DataPoints; | |
import org.junit.experimental.theories.Theories; | |
import org.junit.experimental.theories.Theory; | |
import org.junit.runner.RunWith; | |
import static org.junit.Assert.assertThat; | |
import static org.junit.Assume.assumeNotNull; |
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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<script type="text/javascript" language="javascript" src="demo/demo.nocache.js"></script> | |
</head> | |
<body> | |
<input type="text" id="passphrase"> | |
<input type="key" id="key"> | |
<textarea id="plaintext"></textarea> |
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
public static void copyFile(File sourceFile, File destFile) throws IOException { | |
if (!destFile.exists()) { | |
destFile.createNewFile(); | |
} | |
FileInputStream fIn = null; | |
FileOutputStream fOut = null; | |
FileChannel source = null; | |
FileChannel destination = null; | |
try { | |
fIn = new FileInputStream(sourceFile); |
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
/* | |
* Copyright (C) 2011, Mark Renouf | |
* | |
* This code is licensed to you under the Apache License, | |
* Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the | |
* License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
OlderNewer