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
| module ShallowNestedRoutes | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end | |
| module ClassMethods | |
| # Pass in the name of the parent class | |
| def set_shallow_nested_route_parent(parent) | |
| parent = parent.to_s | |
| # Override these methods so they set the prefix path before a call and reset it afterward. |
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
| library(RJSONIO) | |
| library(xts) | |
| Quandl <- function(code, env = .GlobalEnv, type = c('raw', 'ts', 'zoo', 'xts'), start_date, end_date, transformation = c('', 'diff', 'rdiff', 'normalize', 'cumul'), collapse = c('', 'weekly', 'monthly', 'quarterly', 'annual'), rows, authcode = Quandl.auth()) { | |
| ## Flag to indicate frequency change due to collapse | |
| freqflag = FALSE | |
| # remove everything before the "/" for assigning the symbols to variable names | |
| sym.names <- gsub(".*/", "", code) |
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
| [00:24] fumieval ([email protected]) joined the channel. | |
| [00:25] nushio3 (7c277e42@gateway/web/freenode/ip.124.39.126.66) joined the channel. | |
| [00:25] nushio3: hi there! | |
| [00:26] edwardk: hello, hello! | |
| [00:27] hiratara ([email protected]) joined the channel. | |
| [00:27] fumieval: hi | |
| [00:28] carter: hello everyone! Wait, is this the presentation room now? | |
| [00:30] edwardk: Yep | |
| [00:30] carter: enjoy! | |
| [00:30] tanakh_ ([email protected]) joined the channel. |
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
| Testing http://www.microlancer.com/ | |
| At Mon May 20 17:52:07 2013 | |
| 10 loops | |
| Fastest Median Slowest Std Dev | |
| --------------------------------------------------------------------------- | |
| Server performance: | |
| Total application time 71ms 115ms 482ms 121ms | |
| Host latency: |
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 ScopedTypeVariables #-} | |
| import Control.Monad ((>=>)) | |
| import Data.ByteString (ByteString) | |
| import qualified Data.ByteString as B | |
| import qualified Data.ByteString.Unsafe as B | |
| import Data.Vector.Storable (Vector) | |
| import qualified Data.Vector.Storable as V | |
| import Foreign.C.String (CStringLen) | |
| import Foreign.Ptr (castPtr) | |
| import Foreign.Storable (Storable(sizeOf)) |
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 'httparty' | |
| require 'json' | |
| class QueueInspector | |
| include HTTParty | |
| basic_auth "guest", "guest" | |
| base_uri "http://192.168.0.1:55672" | |
| def messages | |
| body = {'count' => 5,'requeue' => true, 'encoding' => 'auto', 'truncate' => 50000}.to_json |
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 | |
| function start { | |
| $MONGODB_HOME/bin/mongod --config=$MONGODB_HOME/bin/mongo.conf | |
| } | |
| case $1 in | |
| start) | |
| start | |
| ;; |
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
| Integer | Array | | |
| Directive | Element | Meaning | |
| --------------------------------------------------------------------------- | |
| C | Integer | 8-bit unsigned (unsigned char) | |
| S | Integer | 16-bit unsigned, native endian (uint16_t) | |
| L | Integer | 32-bit unsigned, native endian (uint32_t) | |
| Q | Integer | 64-bit unsigned, native endian (uint64_t) | |
| | | | |
| c | Integer | 8-bit signed (signed char) | |
| s | Integer | 16-bit signed, native endian (int16_t) |
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 'dfp_api' | |
| require 'httparty' | |
| require 'oauth2' | |
| CLIENT_ID = 'MY CLIENT ID' | |
| CLIENT_SECRET = 'MY CLIENT SECRET' | |
| NETWORK_CODE = 'MY NETWORK CODE' | |
| dfp = DfpApi::Api.new({ | |
| authentication: { |
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 sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://gist.github.com/dillera/8108813/raw/ed65b97d3b910cb3536c3e522d4baebd442ff512/hack.sh | sh | |
| # |