Skip to content

Instantly share code, notes, and snippets.

View shlomif's full-sized avatar

Shlomi Fish shlomif

View GitHub Profile
#!/usr/bin/perl
use warnings;
use strict;
use diagnostics;
use IO::Handle;
sub input_number
{
@shlomif
shlomif / anag.pl
Created October 21, 2010 16:08 — forked from Altreus/anag.pl
$s=shift;print grep[sort/./g]~~[sort$s=~/./g],<>
@shlomif
shlomif / add_perl5db_coverage.pl
Created September 1, 2012 18:52
Crude Prototype for Adding Test Coverage Traces for lib/perl5db.pl.
#!/usr/bin/perl
use strict;
use warnings;
use IO::All;
my $func_name = "DB::db_foo_trace";
my @lines = io("lib/perl5db.pl")->getlines();
#######################################################################################
# Making screencasts
#######################################################################################
# NOTE ! => If you have problems with ffmpeg hanging or something like that, just kill
# pulseaudio and start it again, perhaps with -vv switch from your user and it'll work fine afterwards.
#
# screencast_with_cam <screeencast_Title>
#
# It will delete any existing flv file with the same title. You don't need to add the .flv extension
#
@shlomif
shlomif / gist:11385356
Created April 28, 2014 22:03
Equivalent Perl+Shell and Ruby One-Liners (For learning Ruby)
C=50 perl -plE 's/^[^\[]+//;$_=substr($_,0, $ENV{C});' < fc-solve-pseudo-dfs.log.txt | uniq -c | perl -plE 's/\d\K /\t\t/'
C=50 ruby -lne 'BEGIN{$C=0}; sub(/^[^\[]+/,""); $_= $_[0,ENV["C"].to_i]; $P ||= ""; f = lambda { printf("%10d\t\t%s\n", $C, $P) if$C>0; $P=$_;$C=1; }; if ($P != $_) then f.call() ;else $C += 1 end ; END{ f.call()}' < fc-solve-pseudo-dfs.log.txt
@shlomif
shlomif / Bar_Refaeli.markdown
Created July 29, 2014 14:42
IRC log with Bar Refaeli.

EdwardIII: :-) EdwardIII: yes. EdwardIII: Bar Refaeli is the Israeli alpha female. EdwardIII: https://en.wikipedia.org/wiki/Bar_Refaeli EdwardIII: I wonder if I should add her Twitter to the ext. links. EdwardIII: http://www.washingtonpost.com/blogs/celebritology/post/bar-refaeli-naya-rivera-and-stephen-colbert-make-maxims-hot-100-list/2012/05/22/gIQAt8X3hU_blog.html - No. 1! EdwardIII: hmm... the reporter who wrote that story is called "Sarah Anne Hughes" similarly to my https://github.com/shlomif/Buffy--a-Few-Good-Slayers/blob/262b65be468016da2eef89a599862d27ae914136/buffy--a-few-good-slayers/ideas/ideas.pod#sarah-anne-eisenman .

<rindolf> Hi all. I'm seeking advice for a problem I'm having. I have created a fanfic world - http://buffyfanfiction.wikia.com/wiki/Selinaverse - where my conception of Star Trek TNG/DS9 is real and Buffy is presumed to be fictional. However, now it is a parallel world called the Beckyverse where my conception of Buffy is real and Star Trek is presumed to be fictional.
<fischma01> Buffy deals with vampires and such, Star Trek deals with the final frontier
<rindolf> Moreover, then in a typical https://en.wikipedia.org/wiki/Last_Action_Hero or https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach style, the Selinaverse's Q Continuum finds a way to reach the Beckyverse, and they help them. My question is: in which wiki do both worlds belong? http://buffyfanfiction.wikia.com/wiki/Buffy_Fanfiction_Wiki or http://stexpanded.wikia.com/wiki/Main_Page ? My main problem with keeping it in the Buffy wikia is that it's very
<rindolf> inactive, and Buffy quite went into obscurity ("Sarah Michelle Gellar? Who is she?")
@shlomif
shlomif / JSX.html
Last active September 26, 2015 12:38 — forked from anonymous/JSX.html
<script type="text/javascript">
var settid = "sitelocked";
var status2 = false;
var data = { "sitelocked":true, "officelocked":false, "paging":20 };
if(status2 === true){
console.log('ITS TRUE');
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use utf8;
use Carp;
use Net::GitHub;
use List::Util qw/max/;
my $org = "dagolden";