Skip to content

Instantly share code, notes, and snippets.

View agargiulo's full-sized avatar

Anthony Gargiulo agargiulo

View GitHub Profile
agargiulo / diff.zsh
Last active August 29, 2015 14:06
Floating point fun
View diff.zsh
print "ruby vs python:"
diff <(echo $money | ruby ex12b.rb) <(echo $money | python3 && print "No changes"
print "ruby vs java:"
diff <(echo $money | ruby ex12b.rb) <(echo $money | java ex12b) && print "No changes"
agargiulo / lrb.zsh
Last active August 29, 2015 14:06
Learning Ruby, got lazy so this was made.
View lrb.zsh
lrb () {
if [[ -e $filename ]]
vim $filename
vim $filename +startinsert
View gist:cdd2271aadf3b3a98dc2
[19:45:48] % ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=127 time=558.698 ms
64 bytes from icmp_seq=1 ttl=127 time=151.799 ms
64 bytes from icmp_seq=2 ttl=127 time=688.438 ms
64 bytes from icmp_seq=3 ttl=127 time=172.532 ms
64 bytes from icmp_seq=4 ttl=127 time=374.557 ms
64 bytes from icmp_seq=5 ttl=127 time=212.875 ms
64 bytes from icmp_seq=6 ttl=127 time=206.686 ms
64 bytes from icmp_seq=7 ttl=127 time=940.021 ms

Keybase proof

I hereby claim:

  • I am agargiulo on github.
  • I am agargiulo ( on keybase.
  • I have a public key whose fingerprint is BAA1 A658 1060 B244 DE49 6D41 5C36 CA3C BF43 F315

To claim this, I am signing this object:

agargiulo / Things.rb
Created March 2, 2015 19:19
Playing around with Ruby classes and modules.
View Things.rb
module Foo
class << self
def logger
@logger ||=$stdout)
class FunThing
def self.is_fun? item
item.is_a? FunThing
agargiulo / nothing.perl
Created July 23, 2015 23:02
Fun with returning nothing in different languages
View nothing.perl
sub Foo {
sub Bar {
return undef;
my $foo_item = Foo();
my $bar_item = Bar();
agargiulo / update_rc_files
Created July 11, 2011 04:21
simple zsh script to move rc files around in home directory/repo
View update_rc_files
# go to $HOME
cd ~
# look for all .*rc files
for rc in \.*rc;
# $rc2 = filename without the leading .
agargiulo /
Created August 19, 2011 20:27
failing perl script section
use 5.010;
open(my $config, ">" "$configfile") or die $!;
$output = $row->{value};
my @output = split(/\n/, $output);
if ($wroteToFile)
foreach (@output)
agargiulo /
Created January 2, 2012 08:36
stupid note fad thing
question 1
question 2
View updates.zsh
echo wget -O CentOS/initrd_6_32.img ""
wget -O CentOS/initrd_6_32.img ""
echo wget -O CentOS/initrd_6_64.img ""
wget -O CentOS/initrd_6_64.img ""
echo wget -O CentOS/vmlinuz_6_32 ""
wget -O CentOS/vmlinuz_6_32 ""
echo wget -O CentOS/vmlinuz_6_64 ""
wget -O CentOS/vmlinuz_6_64 ""