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 | |
| echo $1.x | |
| jshon -e normal -e log_locations -n array -i picor -p -p < $1 > $1.x | |
| mv $1.x $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
| body { | |
| background-color: #333; | |
| } | |
| #servicePane { | |
| background-color: #242424; | |
| } | |
| #picker { | |
| background-color: #333; |
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 'rubygems' | |
| require 'murder' | |
| set :remote_murder_path, '/etc/bundler.chef/vendor/bundle/ruby/1.9.1/gems/murder-0.1.2/dist/' # or some other directory | |
| s = [] | |
| pee = s[0..(ENV['COUNT'].to_i || -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
| require 'mechanize' | |
| require 'chatterbot' | |
| require 'htmlentities' | |
| BASE_URL = "http://meteo.orange.fr/Php/getPrevPluies.php" | |
| ARG = "code=0751080" | |
| def get_weather | |
| agent = Mechanize.new |
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
| whois -h whois.radb.net -- '-i origin AS32934' | grep ^route: | sed -e "s/route: /allow/;s/$/;/" | |
| # https://dev.twitter.com/discussions/6545 | |
| whois -h whois.radb.net -- '-i origin AS13414' | grep ^route | sed -e "s/route: /allow/;s/$/;/" |
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 NewRelic | |
| module Agent | |
| module Instrumentation | |
| # == NewRelic instrumentation for controller actions and tasks | |
| # | |
| # This instrumentation is applied to the action controller to collect | |
| # metrics for every web request. | |
| # | |
| # It can also be used to capture performance information for | |
| # background tasks and other non-web transactions, including |
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
| send_graphite("munin5.mysql.slow_count %.5f %d" % [@slow_count.to_f/@interval, Time.now.to_i]) | |
| def send_graphite(message) | |
| hostname = 'graphite' | |
| port = 2003 | |
| begin | |
| s = TCPSocket.open(hostname, port) | |
| s.puts(message) | |
| s.close |
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 'rubygems' | |
| require 'handlebars' | |
| require 'v8' | |
| # V8::C::V8.SetFlagsFromString("--max-old-space-size=200") | |
| @heap_stats_methods = [:total_heap_size, :total_heap_size_executable, :used_heap_size, :heap_size_limit] | |
| @st = V8::C::HeapStatistics.new | |
| def dump_stats |
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
| libraryDependencies += "org.jruby" % "jruby" % "1.7.2" | |
| libraryDependencies += "org.mozilla" % "rhino" % "1.7R4" | |
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
| #include <SoftwareSerial.h> | |
| // This is the input and output of the ePIR | |
| #define rxPin 3 | |
| #define txPin 2 | |
| // we will switch on and off the onboard led. | |
| #define onBoardLed 13 | |
| // set up a new serial port |