Skip to content

Instantly share code, notes, and snippets.

View dolmen's full-sized avatar
😁
Happy!

Olivier Mengué dolmen

😁
Happy!
View GitHub Profile
@bzerangue
bzerangue / twitter-button.xsl
Created August 31, 2011 17:21
[XSLT] Twitter Button XSL Utility
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Twitter Button: XSL Utility
Created by Zerangue, Brian on 2011-08-31.
Copyright (c) 2011 Brian Zerangue. All rights reserved.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@diegok
diegok / repl.rc
Created October 25, 2011 14:22
My Devel::REPL config file (~/.re.pl/repl.rc)
$_REPL->load_plugin($_) for qw(
History Colors
FancyPrompt Refresh
Interrupt OutputCache
DDC Nopaste
CompletionDriver::Keywords
CompletionDriver::LexEnv
CompletionDriver::Methods
CompletionDriver::INC
@eiro
eiro / gist:1322199
Created October 28, 2011 12:54
inotify based autoreload for perl dancer
#! /usr/bin/env zsh
dancer_pid=
dancer () {
perl bin/dancer &
dancer_pid=$!
}
kill_dancer () { kill $dancer_pid }
restart_dancer () { kill_dancer && dancer }
changes_in_source_tree () {inotifywait -r -e modify --exclude ".*swp" . }
@Zenithar
Zenithar / rio.coffee
Created January 11, 2012 22:50
French RIO Checksum and Check procedure
#
# Used to calculate the checksum
# http://fr.wikipedia.org/wiki/Relev%C3%A9_d'identit%C3%A9_op%C3%A9rateur
#
exports.calcChksm = (oo, q, rrrrrr, notel) ->
concatenation = "#{oo}#{q}#{rrrrrr}#{notel}"
ordre = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+"
a = b = c = 0
for i in concatenation
@jasonm23
jasonm23 / xterm-256color.svg
Last active February 11, 2024 12:33
Xterm 256color mode color chart, organised into sections. (used on Wikipedia/xterm)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dolmen
dolmen / perlmods.sh
Created June 7, 2012 18:11
List installed Perl modules
perl -MExtUtils::Installed "-Esay for ExtUtils::Installed->modules" > perl-modules.$(date +%Y-%m-%d).txt
@catwell
catwell / active.md
Last active December 21, 2023 09:47
Speakerdecks
@dolmen
dolmen / build-perl-profile.pl
Created July 27, 2012 12:39
My perl environment builder: creates ~/.perl/profile to be called in ~/.bash_profile
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Getopt::Long;
my $CPAN_MIRROR = 'http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/cpan/';
GetOptions("mirror=s" => \$CPAN_MIRROR);
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@dpetrov
dpetrov / cpan_favorites.pl
Created November 7, 2012 08:24
Install all favorited distributions
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Mojo::UserAgent;
my $url = shift @ARGV or die "Usage: $0 metacpan_author_url";
my $ua = Mojo::UserAgent->new;
my $dom = $ua->get($url)->res->dom;