Skip to content

Instantly share code, notes, and snippets.


ade ishs adeishs

View GitHub Profile
#!/usr/bin/env perl
use strict;
use List::Util qw(any);
use Data::Dumper::Concise;
my %h = (
k1 => {
s1 => 0,
s2 => 0,

Keybase proof

I hereby claim:

  • I am adeishs on github.
  • I am adeishs ( on keybase.
  • I have a public key ASDQlVBSXewGedj1Ivd9i-shtY31suJQLNx4RrpyVqvNcgo

To claim this, I am signing this object:

adeishs / .bash_profile
Created Nov 29, 2018
My .bash_profile
View .bash_profile
source ~/git-completion.bash
source ~/perl5/perlbrew/etc/bashrc
adeishs / .vimrc
Last active Dec 1, 2018
My .vimrc
View .vimrc
execute pathogen#infect()
colorscheme borland
set nu
set title
set guifont=Source\ Code\ Pro:h13
set termencoding=utf-8
set encoding=utf-8
set fileencoding=utf-8
set shiftwidth=4 softtabstop=4 smarttab expandtab
set colorcolumn=80
adeishs /
Last active Mar 21, 2018
Multilevel Dictionary (Solution)
#!/usr/bin/env python
import collections
import pprint
dict_factory = lambda: collections.defaultdict(dict_factory)
x = collections.defaultdict(dict_factory)
x['a']['b']['c']['d'] = 1
print x['a']['b']['c']['d']
print pprint.pformat(x) # looks a bit messy, but it gives you the idea
adeishs /
Created Mar 21, 2018
Multilevel Dictionary (Broken)
#!/usr/bin/env python
x = {}
x['a']['b']['c']['d'] = 1
adeishs /
Last active Mar 21, 2018
Perl hashref of hashref
use strict;
use Data::Dumper;
my $x;
$x->{a}->{b}->{c}->{d} = 1;
print Dumper($x)
=begin output
adeishs / jquery-lining-up-table-cols.js
Last active Mar 8, 2018
Lining Up Table Columns with jQuery
View jquery-lining-up-table-cols.js
<script type="text/javascript">
$(function() {
var widths = new Array;
/* get max column widths from tables */
$('table').each(function() {
i = 0;
$(this).find('thead th').each(function() {
w = $(this).width();
You can’t perform that action at this time.