Skip to content

Instantly share code, notes, and snippets.

View nmurthy's full-sized avatar

Nikhil Murthy nmurthy

View GitHub Profile
@nmurthy
nmurthy / getTotps.js
Created January 30, 2019 20:56
export authy totp codes
/* base32 */
/*
Copyright (c) 2011, Chris Umbel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
__author__ = 'SpacedOut Engineering'
__copyright__ = 'Copyright 2019, Spaced Out, Inc'
import os
import requests
from boltons.jsonutils import JSONLIterator
from boltons.iterutils import chunked_iter
from pathlib import Path
# Directory with the jobdiva cached files
__author__ = 'SpacedOut Engineering'
__copyright__ = 'Copyright 2019, Spaced Out, Inc'
import os
import requests
from boltons.jsonutils import JSONLIterator
from boltons.iterutils import chunked_iter
from pathlib import Path
# Directory with the jobdiva cached files

hug QuickstartLearnContributeAcknowledgeDiscuss 2.4.8 The guiding thought behind the architecture hug is the cleanest way to create HTTP REST APIs on Python 3. It consistently benchmarks among the top 3 performing web frameworks for Python, handily beating out Flask and Django. For almost every common Web API task the code written to accomplish it in hug is a small fraction of what is required in other Frameworks.

However, it's important to note, hug is not a Web API Framework. OK--that certainly is a function it performs. And exceptionally well at that. But at its core, hug is a framework for exposing idiomatically correct and standard internal Python APIs externally. A framework to allow developers and architects to define logic and structure once, and then cleanly expose it over other means.

Currently, this means that you can expose existing Python functions / APIs over HTTP and CLI in addition to standard Python. However, as time goes on more interfaces will be supported. The architecture and implementa

@nmurthy
nmurthy / keybase.md
Last active July 27, 2018 22:14
keybase.md

Keybase proof

I hereby claim:

  • I am nmurthy on github.
  • I am nmurthy (https://keybase.io/nmurthy) on keybase.
  • I have a public key ASCbdPm2hHkVtT50FNAcwZuhCULH5i3lW4i7uPxliLkePwo

To claim this, I am signing this object:

@nmurthy
nmurthy / jump-ido.el
Created August 22, 2012 17:59
jump to dirs in ido
;; add this shiz to your .emacs to enable jumping to different directories while ido-finding with C-t
(add-hook 'ido-setup-hook 'ido-my-keys)
(defun ido-completing-read-horiz (prompt choices &optional _predicate require-match
initial-input hist def _inherit-input-method)
"do ido-completing-read, but horizontally"
(let ((old-decorations ido-decorations)
(res ""))
(setq ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]"))
(setq res (ido-completing-read prompt choices _predicate require-match initial-input hist def _inherit-input-method))
@nmurthy
nmurthy / ensime.el
Created July 25, 2012 18:52
My addressbook .ensime fiel
;; This config was generated using ensime-config-gen. Feel free to customize its contents manually.
(
:project-name "addressbook"
:project-package "com.twitter.addressbook"
:use-maven t
@nmurthy
nmurthy / bundle_exec_aliases.zsh
Created October 27, 2011 21:01
Alias all ruby bins in your rvm install to b<bin>, which bundle exec's it.
for i in $(rvm gemdir)/bin/*; do
bin=$(basename $i)
if (! which $bin &>/dev/null); then
echo "Aliasing b$bin to bundle exec $bin"
alias b$bin="bundle exec $bin"
fi
done