Skip to content

Instantly share code, notes, and snippets.

@mchubby
mchubby / yaml-consumer.pl
Last active October 14, 2015 09:15
A tidbit showing how to get a YAML file for later parsing (place both pure-perl modules in a vendor/ subdir)
use warnings; use strict; use 5.010;
use File::Basename "dirname";
use lib dirname(__FILE__)."/vendor"; # modify @INC
use HTTP::Tiny;
use YAML::Tiny;
my ($username, ) = @ARGV;
die("ERR-Manque arg1 (username)") unless $username;
my $url = 'http://pastebin.com/raw.php?i=PYmvwsZ2';
@mchubby
mchubby / pack Willscript WSC.py
Created December 2, 2013 18:37
I don't remember where I got this. Probably a Chinese forum.
#py3.2
#encoding=utf-8
from struct import unpack,pack
import os
from os import path
from pdb import set_trace as int3