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
| restreamer = (req, res, next) -> | |
| req.removeAllListeners 'data' | |
| req.removeAllListeners 'end' | |
| next() | |
| process.nextTick -> | |
| if req.body? | |
| if req.headers['content-type'] == 'application/x-www-form-urlencoded' | |
| stringify = querystring.stringify | |
| else | |
| stringify = JSON.stringify |
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 | |
| # Assumes the launcher is in ~/.minecraft/minecraft.jar | |
| version=2.8.5 | |
| source=http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%20$version/lwjgl-$version.zip/download | |
| cd ~/.minecraft || exit 1 | |
| checksum=$(md5sum bin/lwjgl.jar | awk '{print $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
| # E.g. | |
| # | |
| # InteractionRepo.with_interaction_for_message(m) do |i| | |
| # i.add_response(m) | |
| # i.call_back | |
| # end | |
| class InteractionRepo | |
| def with_interaction_for_message(message) |
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
| require 'spec_helper' | |
| describe InterfaceEnforcement::Constraint::Type do | |
| context "for a class" do | |
| subject { InterfaceEnforcement::Constraint::Type.new(Set) } | |
| it 'allows the class' do | |
| subject.allows?(Set.new).should be_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
| # mongo 10.1.3.1 | |
| MongoDB shell version: 1.8.5 | |
| connecting to: 10.1.3.1/test | |
| > config = { _id: 'rejproc', | |
| ... members: [ | |
| ... {_id: 0, host: '10.1.3.1'}, | |
| ... {_id: 1, host: '10.1.3.2'}, | |
| ... {_id: 2, host: '10.1.3.3'} | |
| ... ] | |
| ... } |
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
| # | |
| # lxc: linux Container library | |
| # | |
| # (C) Copyright IBM Corp. 2007, 2008 | |
| # | |
| # Authors: | |
| # Daniel Lezcano <dlezcano at fr.ibm.com> | |
| # | |
| # This library is free software; you can redistribute it and/or | |
| # modify it under the terms of the GNU Lesser General Public |
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/env ruby | |
| # | |
| # output | |
| # | |
| # 17.340000 0.000000 17.340000 ( 17.346691) | |
| # 18.380000 0.000000 18.380000 ( 18.388277) | |
| # | |
| require 'benchmark' | |
| def bitmask |
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/env ruby | |
| require 'benchmark' | |
| def bitmask | |
| 2 ** 32 - 1 | |
| end | |
| def bitmask_with_assignment | |
| overshoot = 2 ** 32 |
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
| [sheldonh] $ php -a | |
| Interactive mode enabled | |
| [sheldonh] $ | |
| I should have known. *sigh* |
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 | |
| # | |
| if [ x"$OVERRIDE_WINDOW_TITLE" != x"" ]; then | |
| title=$OVERRIDE_WINDOW_TITLE | |
| else | |
| title=${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~} | |
| fi | |
| case $TERM in |