Skip to content

Instantly share code, notes, and snippets.

View tirkarthi's full-sized avatar

Karthikeyan Singaravelan tirkarthi

View GitHub Profile
@tirkarthi
tirkarthi / gist:1a37fb7046ba6d7e4f2c
Created May 27, 2015 13:04
Fast parallel downloads using HTTP Accept-Ranges and Go-routines
package main
import (
"io/ioutil"
"net/http"
"strconv"
"sync"
)
var wg sync.WaitGroup
@tirkarthi
tirkarthi / gist:e28f62eb562db5037634
Last active August 29, 2015 14:17
Perl script for World cup
#!/usr/bin/perl
use strict;
use warnings;
while (1) {
`wget --no-proxy --quiet http://static.cricinfo.com/rss/livescores.xml -O score.txt`;
sleep(10); # Set to seconds
my $text = `cat score.txt`;
$text =~ m!<title>(.*India.*)</title>!;