Skip to content

Instantly share code, notes, and snippets.

View jest's full-sized avatar

Przemek Wesołek jest

  • Poznań, Poland
View GitHub Profile
@jest
jest / gist:989521
Created May 24, 2011 19:43
Lexical vars in a closure
#!/usr/bin/env perl
use warnings;
use strict;
{
my %hsh = map { ($_ => 1) } qw( some costy hashmap here );
sub has {
return $hsh{$_[0]};
}
@jest
jest / gist:998849
Created May 30, 2011 12:38
jEdit build-support props deps
/usr/bin/perl <<'__END__' -- - plugin-build.xml|dot -Tpng -oplugin-build-deps.png
use 5.010;
use XML::Twig;
say q(digraph test {);
$t=XML::Twig->new();
$t->parsefile(shift);
$r = $t->root;
for ($r->children(q(property))) {
if ($n1=$_->{att}{name}) {
@jest
jest / watch.pl
Created June 15, 2012 09:20 — forked from andrewalker/watch.pl
Watch "on demand" YAPC::NA on player of choice
#!/usr/bin/env perl
use warnings;
use strict;
# For watching "on demand" (i.e. archived) streams
# usage:
# mplayer -user-agent 'NSPlayer/7.10.0.3059' $(perl watch.pl http://ics.webcast.uwex.edu/mediasite/Viewer/?peid=1dde05aea2624c69a12db461afb00a6b1d)
my @parts = (shift =~ /\?peid=(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);
local $" = '-';
@jest
jest / gist:3425640
Created August 22, 2012 13:39
Un-blurry Inconsolata in Ubuntu
<!--
add this to ~/.fonts.conf, inside <fontconfig> (add if file is empty)
-->
<match target="pattern">
<test name="family">
<string>Inconsolata</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
@jest
jest / lesshi.sh
Created September 21, 2015 13:00
alias lesshi='LESS="-R" LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" less'
@jest
jest / docker-compose.yaml
Created October 27, 2015 16:15
Docker-compose file for Rancher which shows port 80 not being published.
postgresql:
image: quay.io/sameersbn/postgresql:9.4-7
environment:
- DB_USER=gitlab
- DB_PASS=xxx
- DB_NAME=gitlabhq_production
volumes:
- /var/lib/postgresql
redis:
@jest
jest / config
Last active February 15, 2016 14:41
More contrast in aptitude download window.
aptitude::UI "";
aptitude::UI::Styles "";
aptitude::UI::Styles::DownloadProgress "";
aptitude::UI::Styles::DownloadProgress::fg "black";
aptitude::UI::Styles::DownloadProgress::bg "yellow";
aptitude::UI::Styles::Progress "";
aptitude::UI::Styles::Progress::fg "black";
aptitude::UI::Styles::Progress::bg "yellow";
@jest
jest / .gistup
Created November 22, 2016 13:35
gistup
@jest
jest / .gistup
Created November 22, 2016 13:37
gistup