Skip to content

Instantly share code, notes, and snippets.

@rossdylan
Created June 25, 2012 17:23
Show Gist options
  • Save rossdylan/2990003 to your computer and use it in GitHub Desktop.
Save rossdylan/2990003 to your computer and use it in GitHub Desktop.
Pure insanity in one line
(lambda args: map(lambda repo: __import__("os").system('git clone {0} {1}/{2}'.format(repo.git_url,args.backupdir,repo.name)),__import__("pygithub3").Github().repos.list(args.username).all()))((lambda : (lambda : [globals().update(argparser=__import__("argparse").ArgumentParser(description="Backup allyour github repos")),map(lambda arg: globals()["argparser"].add_argument(*arg["args"],**arg["kwargs"]),[{"args": ("username",),"kwargs": {"help": "A Github username"}},{"args": ("backupdir",),"kwargs": {"help": "The folder where you want your backups to do"}}]),globals()["argparser"].parse_args()])()[-1])())
@iryw
Copy link

iryw commented Jun 27, 2012

why

@agargiulo
Copy link

I think his answer was, "Because I wanted to make people cry" But don't quote me on that one. =P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment