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
| var Pool = require('sandcastle').Pool; | |
| var sandboxPath = __dirname + '/sandbox-api.js'; | |
| var s = new Pool({numberOfInstances: 20}, {api: sandboxPath, timeout: 30000, useStrictMode: false}); | |
| function callCode(code, callback) { | |
| var script = s.createScript(code); | |
| script.on('exit', function(err, output) { | |
| if (output) { | |
| callback(output); |
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
| (setq custom-file "~/.emacs-custom.el") | |
| (load custom-file) | |
| (package-initialize) | |
| (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
| ("marmalade" . "http://marmalade-repo.org/packages/") | |
| ("melpa" . "http://melpa.milkbox.net/packages/"))) | |
| ;; efff the chrome | |
| (tool-bar-mode -1) | |
| (scroll-bar-mode -1) |
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
| (defcustom ftw-leader-key "C-a" | |
| "Customizable contol key for ftw navigation") | |
| (defun left-edge (win) | |
| (let ((edges (window-edges win))) | |
| (nth 0 edges))) | |
| (defun right-edge (win) | |
| (let ((edges (window-edges win))) | |
| (nth 2 edges))) |
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
| (add-to-list 'load-path "~/.emacs.d/ftw/") | |
| (require 'ftw) | |
| (setq ftw-leader-key "C-;") |
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 | |
| set -e | |
| ### BEGIN INIT INFO | |
| # Provides: postgresql | |
| # Required-Start: $local_fs $remote_fs $network $time | |
| # Required-Stop: $local_fs $remote_fs $network $time | |
| # Should-Start: $syslog | |
| # Should-Stop: $syslog | |
| # Default-Start: 2 3 4 5 |
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 uuidStringBench | |
| import ( | |
| "testing" | |
| "github.com/gocql/gocql" | |
| "fmt" | |
| ) | |
| var ( | |
| u gocql.UUID |
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
| private JsonObject convertJsonToJsonObject(String json) { | |
| // parse json string in to JsonElement | |
| try { | |
| JsonElement toObject = new JsonParser().parse(json); | |
| return toObject.getAsJsonObject(); | |
| }catch(JsonSyntaxException mfe){ | |
| return null; | |
| // This was screwing me up a lot | |
| }catch(IllegalStateException ise){ |
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
| [ | |
| { | |
| "creation_date":"2008-09-08T22:47:31-07:00", | |
| "email":"[email protected]", | |
| "extra_info":{ | |
| "birthday":"1/1", | |
| "haircolor":"brown" | |
| }, | |
| "status":true | |
| }, |
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 ( | |
| "tux21b.org/v1/gocql" | |
| "log" | |
| ) | |
| var cluster *gocql.ClusterConfig | |
| func init() { |
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 void add() { | |
| Node newNode = Node(); | |
| addChild(root, newNode); | |
| } | |
| public void addChild(Node parent, Node child) { | |
| if (parent.leftChild == null) { | |
| parent.leftChild = child; | |
| } else if (parent.rightChild == null) { | |
| parent.rightChild = child; |