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
<html> | |
<head> | |
<title>Demo</title> | |
</head> | |
<body> | |
<h1>PHP Mongo Test</h1> | |
<?php | |
try { | |
$connect = $_ENV["MONGOLAB_URI"]; | |
$m = new Mongo($connect); |
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 | |
=begin lit | |
# Introducing Lit | |
Lit allows developers to embed Markdown in their comments, and extracts | |
it for them to produce human friendly documentation. | |
=end | |
require 'rubygems' |
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
" Line width nags | |
hi OverLength ctermbg=red ctermfg=white | |
let line_width_nag=0 | |
function! ToggleLineWidthNags() | |
if g:line_width_nag==0 | |
match OverLength /\%80v.\+/ | |
let g:line_width_nag=1 | |
else | |
match OverLength // | |
let g:line_width_nag=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
[7] pry(main)> ls 42 | |
Comparable#methods: between? | |
Numeric#methods: +@ abs2 angle arg coerce conj conjugate eql? i imag imaginary nonzero? phase polar pretty_print pretty_print_cycle quo real real? rect rectangular remainder singleton_method_added step to_c | |
Integer#methods: ceil chr denominator downto floor gcd gcdlcm integer? lcm next numerator ord pred rationalize round times to_i to_int to_r truncate upto | |
Fixnum#methods: % & * ** + - -@ / < << <= <=> == === > >= >> [] ^ abs div divmod even? fdiv magnitude modulo odd? size succ to_f to_s zero? | ~ |
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
if usage[:cpu] > BEGIN_RENICE_CPU_THRESHOLD | |
nice = (instance[:nice] || 0) + 1 | |
if nice < MAX_RENICE_VALUE | |
instance[:nice] = nice | |
@logger.info("Lowering priority on CPU bound process(#{instance[:name]}), new value:#{nice}") | |
%x[renice #{nice} -u #{instance[:secure_user]}] | |
end | |
end |
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
~/Projects/mote % cat misc/mote.yml | |
sensors: | |
- Mem | |
- Load | |
- Disk | |
outputs: | |
- Stdout | |
~/Projects/mote % ./bin/mote -c misc/mote.yml | |
{"timestamp":"2012-08-21 13:37:13 -0700","sensor":"mem","values":{"total":8589934592,"used":8567566336,"free":22368256}} |
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
# | |
# Author:: Joshua Timberman (<[email protected]>) | |
# Author:: Adam Jacob (<[email protected]>) | |
# | |
# 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 | |
# |
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 LLVM | |
module CONFIG | |
VERSION = "3.2" | |
PREFIX = "/usr/local/Cellar/llvm/3.2" | |
SRC_ROOT = "/private/tmp/llvm-U6Ok/llvm-3.2.src" | |
OBJ_ROOT = "/private/tmp/llvm-U6Ok/llvm-3.2.src" | |
BIN_DIR = "/usr/local/Cellar/llvm/3.2/bin" | |
INCLUDE_DIR = "/usr/local/Cellar/llvm/3.2/include" | |
LIB_DIR = "/usr/local/Cellar/llvm/3.2/lib" | |
CPP_FLAGS = ["-I/usr/local/Cellar/llvm/3.2/include", "-D_DEBUG", "-D_GNU_SOURCE", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", "-D__STDC_LIMIT_MACROS"] |
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
app.routes do | |
add ['*'], Resources::Static | |
end |
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
$ free -h | |
total used free shared buffers cached | |
Mem: 114G 1.6G 113G 0B 24M 754M | |
-/+ buffers/cache: 815M 114G | |
Swap: 0B 0B 0B |