Library that uses HTML, CSS and SVG to bring data to life.
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_data = Facter::Util::Resolution.exec('rpm --query --all --qf "%{NAME}||%{VERSION}\n"') | |
package_data.split("\n").each do |line| | |
rpm_detail = line.split("||") | |
package_name = 'package_' + rpm_detail[0] | |
package_version = rpm_detail[1] | |
Facter.add(package_name) do | |
setcode do |
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
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ft=erlang ts=4 sw=4 et | |
[ | |
%% Riak Client APIs config | |
{riak_api, [ | |
%% pb_backlog is the maximum length to which the queue of pending | |
%% connections may grow. If set, it must be an integer >= 0. | |
%% By default the value is 5. If you anticipate a huge number of | |
%% connections being initialised *simultaneously*, set this number | |
%% higher. |
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
## Name of the riak node | |
-name [email protected] | |
## Cookie for distributed erlang. All nodes in the same cluster | |
## should use the same cookie or they will not be able to communicate. | |
-setcookie riak | |
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive | |
## (Disabled by default..use with caution!) | |
##-heart |
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
<?php | |
$key = ''; // enter your api key here | |
function getLocations($key) | |
{ | |
$url = "http://api.uwaterloo.ca/public/v1/?key=$key&service=APLocations"; | |
$get = file_get_contents($url); |
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 style=margin:0><canvas id=q /><script>var q=document.getElementById('q'),s=window.screen,w=q.width=s.width,h=q.height=s.height,p=Array(256).join(1).split(''),c=q.getContext("2d"),m=Math,r=m.random;setInterval(function(){c.fillStyle="rgba(0,0,0,0.05)";c.fillRect(0,0,w,h);c.fillStyle="rgba(0,255,0,1)";p=p.map(function(v,i){c.fillText(String.fromCharCode(m.floor(2720+r()*33)),i*10,v);v+=10;if(v>768+r()*10000)v=0;return v})},33)</script> |
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
parser = argparse.ArgumentParser(description='Generic API') | |
parser.add_argument('--name', dest='name', help='full name') | |
parser.add_argument('--token', dest='fbtoken', help='firebase token') | |
args = parser.parse_args() | |
name = args.name | |
firebase = args.fbtoken | |
fname, lname = name.split() |
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 { 'Droplr': | |
source => 'https://droplr.com/download/mac', | |
provider => 'compressed_app' | |
} | |
package { 'Alfred': | |
provider => 'compressed_app', | |
source => 'http://cachefly.alfredapp.com/alfred_1.3.3_267.zip' | |
} |
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
{ | |
"response":{ | |
"meta":{ | |
"Requests":"0", | |
"Timestamp":"2013-02-12T22:55:04-05:00", | |
"Status":"200", | |
"Message":"OK", | |
"Version":"1.4b7" | |
}, | |
"data":{ |
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
# Function recreating the functionality of float() and int() in Python. | |
# By Neil Fraser. Public Domain. 2012. | |
def myFloat(input = 0.0): | |
if type(input) != str: | |
if type(input) == bool: | |
return input and 1.0 or 0.0 | |
if type(input) == float: | |
return input | |
if type(input) in (int, long): |