-
- 10,000 rollbar events / mo
- 7 days data retention
-
- 5,000 rollbar events / mo
- 30 days data retention
This file contains 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
String.prototype.splitSpacesAsInts = function() { | |
return this.split(" ").map(function(aNum) { return parseInt(aNum); }); | |
}; | |
function processData(input) { | |
var lines = input.split("\n"); | |
var first = lines[0].splitSpacesAsInts(); | |
var n = first[0]; | |
var m = first[1]; | |
var ops = lines.slice(1).map(function(line) { return line.splitSpacesAsInts(); }); |
This file contains 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 | |
function extractValue($html) { | |
$v = explode('New posts:</td><td>',$html); | |
return explode('</td>', $v[1])[0]; | |
} | |
function takeBtcTicker() { | |
$url = 'https://www.bitstamp.net/api/ticker/'; | |
$url = 'https://blockchain.info/ticker'; |
This file contains 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 | |
// Demo: http://itsvr.altervista.org/ | |
/* Square area edges in degrees of your custom area map (Verona, Italy) */ | |
$mapLatTop = 45.47; | |
$mapLatBottom = 45.37; | |
$mapLonLeft = 10.92; | |
$mapLonRight = 11.06; |
This file contains 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
# Installing graphite dependencies | |
apt-get install -y python2.6 python-pip python-cairo python-django python-django-tagging | |
apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson | |
pip install whisper | |
pip install carbon | |
pip install graphite-web | |
# Setup a vhost by grabbing the example the graphite team released on their repo. | |
# In this file, you'll provide the url used to access to your Graphite dashboard | |
wget https://raw.github.com/tmm1/graphite/master/examples/example-graphite-vhost.conf -O /etc/apache2/sites-available/graphite |
This file contains 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
import tubes | |
import numpy as np | |
from matplotlib import pyplot | |
import glob | |
from os import path | |
FILES = glob.glob(path.expanduser("~/src/data/ngrams/1gram/googlebooks*")) | |
PYTHON_MATCH = '0' | |
PASCAL_MATCH = '1' |
This file contains 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
TGAPI='TELEGRAM_BOT_API' | |
CHATID='CHAT_ID' | |
ISSUE=`cat MagPiIssue.txt` | |
RES=`curl --write-out "%{http_code}\n" --silent --output /dev/null https://magpi.raspberrypi.org/issues/$ISSUE/pdf` | |
if [ "$RES" -eq 200 ]; | |
then | |
echo "$((ISSUE+1))" > MagPiIssue.txt | |
echo $RES |
This file contains 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
var validator = require('validator'); | |
var hankaku = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '; | |
var zenkaku = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '; | |
var zenkakuToHankaku = function (word) { | |
for (var i = 0, n = zenkaku.length; i < n; i++) { | |
word = word.replace(new RegExp(zenkaku[i], 'gm'), hankaku[i]); | |
} | |
return word.replace(/^\s+|\s+$/g, ''); // trim head and tail white space | |
}; |
This file contains 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 md5(inputString) { | |
var hc="0123456789abcdef"; | |
function rh(n) {var j,s="";for(j=0;j<=3;j++) s+=hc.charAt((n>>(j*8+4))&0x0F)+hc.charAt((n>>(j*8))&0x0F);return s;} | |
function ad(x,y) {var l=(x&0xFFFF)+(y&0xFFFF);var m=(x>>16)+(y>>16)+(l>>16);return (m<<16)|(l&0xFFFF);} | |
function rl(n,c) {return (n<<c)|(n>>>(32-c));} | |
function cm(q,a,b,x,s,t) {return ad(rl(ad(ad(a,q),ad(x,t)),s),b);} | |
function ff(a,b,c,d,x,s,t) {return cm((b&c)|((~b)&d),a,b,x,s,t);} | |
function gg(a,b,c,d,x,s,t) {return cm((b&d)|(c&(~d)),a,b,x,s,t);} | |
function hh(a,b,c,d,x,s,t) {return cm(b^c^d,a,b,x,s,t);} | |
function ii(a,b,c,d,x,s,t) {return cm(c^(b|(~d)),a,b,x,s,t);} |
This file contains 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
# Installing graphite dependencies | |
apt-get install -y python2.6 python-pip python-cairo python-django python-django-tagging | |
apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson | |
pip install whisper | |
pip install carbon | |
pip install graphite-web | |
# Setup a vhost by grabbing the example the graphite team released on their repo. | |
# In this file, you'll provide the url used to access to your Graphite dashboard | |
wget https://raw.github.com/tmm1/graphite/master/examples/example-graphite-vhost.conf -O /etc/apache2/sites-available/graphite |
OlderNewer