Skip to content

Instantly share code, notes, and snippets.

Anthony Gargiulo agargiulo

View GitHub Profile
agargiulo / project_switcher.zsh
Last active Jan 2, 2019
Wanted a way to navigate between different projects using only zsh. Feedback welcome
View project_switcher.zsh
setopt extendedglob
typeset -a project_dirs
find "${HOME}/projects" -maxdepth 1 -type d | while read project; do
function proj() {
agargiulo / .gitconfig
Last active Sep 28, 2018
my git config, more or less
View .gitconfig
name = Person Name
email =
# I love Vim. Vimdiff is amazing. This combined with `merge.conflictstyle = diff3`
# makes for fun 4 pane vim sessions that make merge headaches almost all go away
tool = vimdiff
compactionHeuristic = true
agargiulo / nothing.perl
Created Jul 23, 2015
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 / Things.rb
Created Mar 2, 2015
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

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:

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
agargiulo / heron.c
Last active Oct 3, 2016
Heron square root implementations in a few languages.
View heron.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
double heron_sqrt(long n, double percision);
void compare_sqrt(long n);
int main(int argc, char **argv)
agargiulo / lrb.zsh
Last active Aug 29, 2015
Learning Ruby, got lazy so this was made.
View lrb.zsh
lrb () {
if [[ -e $filename ]]
vim $filename
vim $filename +startinsert
agargiulo / diff.zsh
Last active Aug 29, 2015
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"
View run_build.zsh
for and_target in `print -l ${ANDROID_TARGET} `;do
android update project -p . --subprojects -t ${and_target} -n GatekeeperAndroid
ant debug
You can’t perform that action at this time.