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
use strict; | |
use AnyEvent; | |
use Time::HiRes; | |
use Data::Dumper; | |
my $iterations = 10000000; | |
my $start = Time::HiRes::time; | |
for ( my $i = 0; $i < $iterations; $i++ ) | |
{ |
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
$REPO=`git svn info | grep "Repository Root: " | sed -e 's/Repository Root: //'` | |
git branch -r | sed 's|^[[:space:]]*||' | grep -v '^tags/' > git-branch-list | |
svn ls $REPO/branches | sed 's|^[[:space:]]*||' | sed 's|/$||' > svn-branch-list | |
diff -u git-branch-list svn-branch-list | grep '^-' | sed 's|^-||' | grep -v '^trunk$' | grep -v '^--' > old-branch-list | |
for i in `cat old-branch-list`; do git branch -d -r "$i"; rm -rf .git/svn/refs/remotes/"$i"; done | |
rm -v old-branch-list svn-branch-list git-branch-list |
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 2007 Amazon Elena@AWS | |
// http://aws.amazon.com/code/developertools/1137 | |
// | |
// Licensed 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 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
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
// Fuzzy matching algorithm | |
var fuzzyMatch = function(needle, haystack) { | |
if(needle === "" || haystack === "") return true; | |
needle = needle.toLowerCase().replace(/ /g, ""); | |
haystack = haystack.toLowerCase(); | |
// All characters in needle must be present in haystack | |
var j = 0; // haystack position | |
for(var i = 0; i < needle.length; i++) { |
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
(function(){ | |
var toBaseN = function(n, base) { | |
if(base < 2 || base > 65535) { | |
throw "Base must be between 2 and 65535 inclusive" | |
} | |
var str = ""; | |
var sign = ""; | |
if(n < 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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"io/ioutil" | |
"log" | |
"os" | |
) |
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
{-# LANGUAGE OverloadedStrings #-} | |
import Char | |
import Control.Monad (join) | |
import Network.Wai | |
import Network.HTTP.Types | |
import Network.Wai.Handler.Warp (run) | |
import Data.ByteString.Lazy.Char8 () -- Just for an orphan instance | |
import Control.Monad.IO.Class (liftIO) | |
import Data.Conduit | |
import Data.String.Utils () |
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 Control.Monad as Monad | |
import System.Exit | |
import System.IO as IO | |
import System.Environment as Env | |
main :: IO () | |
main = do | |
-- Get the command line arguments | |
args <- Env.getArgs |
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
--- cramfs-1.1/cramfsck.c 2011-09-09 13:39:01.000000000 -0700 | |
+++ cramfs-dtjm/cramfsck.c 2011-09-09 13:39:02.000000000 -0700 | |
@@ -47,14 +47,17 @@ | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
-#include <sys/sysmacros.h> | |
#include <utime.h> | |
#include <sys/ioctl.h> | |
#define _LINUX_STRING_H_ |