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
url = ARGV.shift | |
redirect = true | |
while redirect do | |
redirect = false | |
status = "" | |
location = "<none>" | |
curl = `curl -s -I #{url}|dos2unix` |
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
#!/usr/bin/perl -w | |
# | |
use strict; | |
use Net::DBus; | |
eval { | |
my $bus = Net::DBus->find; | |
my $hamster = $bus->get_service("org.gnome.Hamster"); | |
my $hamster_manager = $hamster->get_object("/org/gnome/Hamster","org.gnome.Hamster"); |
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
require 'fb_graph' | |
ids = File.new('data').readlines; | |
for id in ids do | |
tm = id.split(';') | |
user = tm[2] | |
begin | |
fbu = FbGraph::User.new(user) | |
fbu.fetch() |
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
#!/usr/bin/env ruby | |
# | |
require 'yaml' | |
require 'rubygems' | |
require 'fog' | |
require 'thor' | |
require 'colorize' | |
class Main < Thor |
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
#!/bin/bash | |
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Ubuntu 11.10 Oneiric Ocelot | |
# Forked from https://gist.github.com/1287170 | |
# Modified to use NGinx + uwsgi instead of Apache, as well as memcached and supervisord, incorporating ideas from | |
# http://blog.adku.com/2011/10/scalable-realtime-stats-with-graphite.html |
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
my $requests = 0; | |
my %status; | |
my %type; | |
my %method; | |
my %kind; | |
while (<>) { | |
next if (/request: /); | |
next if (/\[(info|warn)\]/); |
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
#!/usr/bin/perl -w | |
# | |
sub dec2ip ($) { | |
join '.', unpack 'C4', pack 'N', shift; # copied from the hive mind | |
} | |
open (LOCS, '<GeoLiteCity-Location.csv'); | |
my %es_locs; |
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
#!/usr/bin/perl | |
my $group = shift; | |
my @users = (); | |
my $gam_call = "python gam.py"; | |
die "please specify a group" unless $group; | |
while (<>) { |
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
require 'json' | |
require 'rest-client' | |
participacion_url = 'http://resultados-elecciones.rtve.es/andalucia/multimedia/json/2015/participacion/andalucia/2015-participacion-andalucia.json' | |
partidos_url = 'http://resultados-elecciones.rtve.es/andalucia/multimedia/json/2015/resultados/andalucia/2015-resultados-andalucia.json' | |
partidos = JSON.parse(RestClient.get(partidos_url)) | |
participacion = JSON.parse(RestClient.get(participacion_url)) | |
%w(escrutado_porcentaje en_blanco_porcentaje abstencion_porcentaje nulos_porcentaje).each do |data| |
OlderNewer