Skip to content

Instantly share code, notes, and snippets.

View SebDeclercq's full-sized avatar

Sébastien Declercq SebDeclercq

View GitHub Profile
#!/usr/bin/ruby1.9.3
# -*- coding: utf-8 -*-
class Humeur
attr_accessor :depression
attr_accessor :anxiete
attr_accessor :irritabilite
attr_accessor :excitation
attr_reader :moment
attr_reader :id
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use XML::LibXML;
use Excel::Writer::XLSX;
my $path = "C:/genie/perl-5.20/scripts/input_files";
use strict;
use warnings;
while (<DATA>) {
next unless s/\bcei\b/iec/i;
tr/a-z/A-Z/;
print;
}
__DATA__
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use experimental 'postderef';
use Data::Dumper;
my $ref = [ { 'az' => 'er', 'ty' => 'uiop', },
[ 1..12 ],
package pieChart {
use Moose;
has 'label', is => 'ro', isa => 'Str';
has 'data', is => 'ro', isa => 'ArrayRef';
has 'pcsuccess', is => 'ro', isa => 'Int';
has 'pcerror', is => 'ro', isa => 'Int';
sub png {
use GD::Graph::pie;
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use LWP::UserAgent;
use XML::RSS;
use HTML::ResolveLink qw/extract_main_html/;
use experimental 'signatures';
use RSS::DB;
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use File::Slurp;
use File::Find::Rule;
use Digest::SHA1;
(defun classic21-currently-playing ()
(interactive)
(url-copy-file "http://www.rtbf.be/classic21/conducteur" "/tmp/classic21.html")
(find-file "/tmp/classic21.html")
(goto-char 1)
(setq song-start (search-forward "<h4>Titre: <strong>")
song-end (- (search-forward "</") 2)
singer-start (search-forward "<p>Artiste: <strong>")
singer-end (- (search-forward "</") 2))
#! /usr/bin/perl -w
use strict;
use warnings;
use feature 'say';
use LWP::Simple;
my @page = get('http://www.rtbf.be/classic21/conducteur');
my ( $song, $singer );
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Adding shortcuts for text formatting ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun org-set-bold ()
"Mark current region as bold or open new bold mark ups"
(interactive)
(let (rstart rend)
(if (region-active-p)