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
$nodeUrl = "http://nodejs.org/dist/v0.10.22/x64/node-v0.10.22-x64.msi" | |
$nodeSha = "c3c169304c6371ee7bd119151bcbced61a322394" | |
function DownloadIt($url, $path) | |
{ | |
Start-BitsTransfer -Source $url -Destination $path | |
} | |
function TestHash($path, $sha) | |
{ |
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 _ = require('underscore'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var Q = require('Q'); | |
function processFileAsync(context) | |
{ | |
return Q.ninvoke(fs, "stat", context.path) | |
.then(function(stat) { |
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
1/24/14 11:13:17.808 AM VMware Fusion[939]: -[NSViewController loadView] loaded the "plVMDKOpenHelper" nib but no view was set. | |
1/24/14 11:13:17.809 AM VMware Fusion[939]: ( | |
0 CoreFoundation 0x00007fff87d9741c __exceptionPreprocess + 172 | |
1 libobjc.A.dylib 0x00007fff8775de75 objc_exception_throw + 43 | |
2 CoreFoundation 0x00007fff87d972cc +[NSException raise:format:] + 204 | |
3 AppKit 0x00007fff88169507 -[NSViewController loadView] + 361 | |
4 VMware Fusion 0x00000001079ca47f VMware Fusion + 152703 | |
5 VMware Fusion 0x0000000107a5e0e7 VMware Fusion + 757991 | |
6 VMware Fusion 0x0000000107a5dfe1 VMware Fusion + 757729 | |
7 VMware Fusion 0x0000000107c0c2dc _ZN3cui19VMConfigTransaction3SetINS_16VMConfigPolicies16PolicyProtectionEEEvRNS_19TransactionPropertyIT_S0_EERKS5_ + 286956 |
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
JSON: | |
[ | |
{ | |
international_date: false, | |
is_coed: false, | |
team_name: "foo bar" | |
}, | |
{ | |
international_date: false, | |
is_coed: false, |
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
// Fun with F# and bulk copy | |
open System.Configuration | |
open System.Data | |
open System.Data.SqlClient | |
let getOpenConnection () = | |
let cn = new SqlConnection(ConfigurationManager.ConnectionStrings.["TdsScratch"].ConnectionString) | |
cn.Open () | |
cn |
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
-module(sort). | |
-export([qsort/1]). | |
%%% A slightly naive implementation. But at least it does partial TCO. | |
partition(_, [], Smaller, Equal, Larger) -> {Smaller, Equal, Larger}; | |
partition(Pivot, [H|T], Smaller, Equal, Larger) when H < Pivot -> partition(Pivot, T, [H|Smaller], Equal, Larger); | |
partition(Pivot, [H|T], Smaller, Equal, Larger) when H =:= Pivot -> partition(Pivot, T, Smaller, [H|Equal], Larger); | |
partition(Pivot, [H|T], Smaller, Equal, Larger) when H > Pivot -> partition(Pivot, T, Smaller, Equal, [H|Larger]). | |
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:\src> lein ring server | |
Exception in thread "main" java.lang.Exception: Unsupported OS/archetype: Windows 8.1 amd64, compiling:(v8/core.clj:34:2 | |
6) | |
at clojure.lang.Compiler.load(Compiler.java:7142) | |
at clojure.lang.RT.loadResourceScript(RT.java:370) | |
at clojure.lang.RT.loadResourceScript(RT.java:361) | |
at clojure.lang.RT.load(RT.java:440) | |
at clojure.lang.RT.load(RT.java:411) | |
at clojure.core$load$fn__5066.invoke(core.clj:5641) | |
at clojure.core$load.doInvoke(core.clj:5640) |
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
;; Solution to https://github.com/gigasquid/wonderland-clojure-katas/tree/master/alphabet-cipher | |
(ns alphabet-cipher.coder) | |
(defn crypt [op keyword message] | |
(letfn [ | |
(tochar [idx] (char (+ idx (int \a)))) | |
(toidx [ch] (- (int ch) (int \a))) | |
(encode [keychar msgchar] (tochar (mod (op (toidx msgchar) (toidx keychar)) 26)))] | |
(->> message | |
(map encode (cycle keyword)) |
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
$ErrorActionPreference = "Stop" | |
$root = Resolve-Path "$PSScriptRoot\.." | |
$shell = New-Object -com shell.application | |
# Read white listed dependency version info from the /bin/sh script and store in variables | |
Get-Content $root\script\bootstrap | | |
Where-Object { $_ -match '^\s*(\w+)\s*=\s*\"([^\"]*)\"\s*$' } | | |
Where-Object { $matches[1] -in "CLOJURE_RELEASE", "CLOSURE_RELEASE", | |
"DJSON_RELEASE", "GCLOSURE_LIB_RELEASE", "RHINO_RELEASE", "TREADER_RELEASE" } | | |
Foreach-Object { New-Variable $matches[1] $matches[2] -Scope private } |
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
(ns biblecli.commands.serve | |
(:require | |
[cljs.nodejs :as nodejs] | |
[clojure.string :as string] | |
[goog.object])) | |
(def node-http (nodejs/require "http")) | |
(defn process-request [req res] | |
(goog.object/set res "statusCode" 200) |
OlderNewer