Skip to content

Instantly share code, notes, and snippets.

Avatar

ab5tract ab5tract

  • Amsterdam, Netherlands
View GitHub Profile
View bigint-timetrial.p6
use v6;
sub bigpackids(int @ids) {
my $ret = 0;
my $c = 0;
while $c++ < +@ids {
$ret = $ret +| (1 +< (@ids[$c] - 1));
}
return $ret;
View gist:d730a845a3915f7abdcf
#!/usr/bin/env perl6
use v6;
sub MAIN($dir) {
my $handler-supplier = Supplier.new;
my $handler-supply = $handler-supplier.Supply;
my %seen;
my $dispatch-promise = start {
say "Watching out on '$dir'";
@ab5tract
ab5tract / sha1.p6
Last active Dec 11, 2015 — forked from cognominal/sha1.p6
sha1 hash
View sha1.p6
subset Sha1 of Str where *.chars == 40 and m:i/<[A..Z 0..9]>/;
class Sha1H does Associative {
has $!sha1;
has %!h{Sha1(Str)};
method AT-KEY($_) { %!h{ .lc } };
method ASSIGN-KEY($_, $v) { %!h{ .lc } = $v }
}
class Sha1Str is Str {
View Grid.pm6
unit class Grid;
#use Terminal::Print::Commands;
#
#constant T = Terminal::Print::Commands;
has @.grid;
has $!character-supply;
has $!control-supply;
View gist:18b95160763bf901c74e
module Chance {
my @faces = '⚀', '⚁', '⚂', '⚃', '⚄', '⚅';
sub term:<¿>() is export(:golf) { @faces.roll }
sub chance() is export { ¿ }
}
import Chance;
say chance;
View i3-workspace-watcher.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'i3-ipc'
i3 = I3::IPC.new
def process(data)
data.each do |ws|
if ws["focused"]
View clip-circle.ps
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 300 300
/period 2 def
/thick 1 def
2 2 scale
10 10 translate
thick setlinewidth
@ab5tract
ab5tract / gist:1224064
Created Sep 17, 2011
PoG - Tumblr Accounts
View gist:1224064
http://www.tumblr.com/tumblelog/seyalex
http://maxweidlich.tumblr.com/
http://quic0.tumblr.com
http://dennii3.tumblr.com/
http://www.tumblr.com/tumblelog/willem12
http://mbustraan.tumblr.com/
http://e-langhout.tumblr.com
http://www.tumblr.com/tumblelog/fajknerd
http://matthiasfelix.tumblr.com/
http://loocerasemag.tumblr.com
View googleNewsResults.09.jan.2010
http://www.themoneytimes.com/20100109/washingtons-tech-efforts-felt-show-id-1096496.html
http://www.thestandard.com/news/2010/01/09/court-questions-fcc-authority-impose-net-neutrality
http://www.pcworld.com/article/186504/tame_your_tvs_wild_volume_swings.html/
http://news.idg.no/cw/art.cfm?id=148944D3-1A64-67EA-E4D6B55F5D2A0BAA
http://www.networkworld.com/news/2010/010910-court-questions-fcc-authority-to.html
http://www.istockanalyst.com/article/viewiStockNews/articleid/3770166
http://www.officialwire.com/main.php?action=posted_news&rid=48210&catid=848
http://www.istockanalyst.com/article/viewiStockNews/articleid/3770132
http://host.madison.com/ct/business/technology/blog/article_7bbcca8a-fd3f-11de-ad65-001cc4c03286.html
http://www.huffingtonpost.com/timothy-karr/att-consultant-conjures-e_b_417317.html
View shmoogleResults.09.Jan.2010
http://googlepublicpolicy.blogspot.com/2007/06/what-do-we-mean-by-net-neutrality.html
http://books.google.com/books?id=WGPZ6BLBpkMC&pg=PT177&lpg=PT177&dq=%22net+neutrality%22&source=bl&ots=2z3JONy5wO&sig=rrqwDass2hqFVdWyic_Gsa73AtQ&hl=en&ei=SfVIS8PWE4LW-Qaa_J1M&sa=X&oi=book_result&ct=result&resnum=62&ved=0CKIBEOgBMD042AQ
http://www.digitalspy.co.uk/digitaltv/news/a93556/virgin-media-ceo-attacks-net-neutrality.html
http://civ.moveon.org/save_the_internet/background.html
http://wiki.idebate.org/en/index.php/Debate:Net_Neutrality
http://conferences.sigcomm.org/hotnets/2006/yang06technical.pdf
http://www.mydd.com/story/2006/6/10/23516/7660
http://www.networkworld.com/news/2009/021209-international-net-neutrality.html
http://books.google.com/books?id=J85RP4YmBTYC&pg=PA173&lpg=PA173&dq=%22net+neutrality%22&source=bl&ots=FVzP-5neZd&sig=LF5dbFYbit3_YxxZU3Tu2UbHhYA&hl=en&ei=SfVIS8PWE4LW-Qaa_J1M&sa=X&oi=book_result&ct=result&resnum=57&ved=0CJYBEOgBMDg42AQ
http://www.humanevents.com/article.php?id=33718