Skip to content

Instantly share code, notes, and snippets.

View nickpresta's full-sized avatar

Nick Presta nickpresta

View GitHub Profile
@nickpresta
nickpresta / gist:4296c2e75cad392f351f
Created August 26, 2014 18:31
Parsing "dict" arguments for Invoke
def parse_extra_args(extra_args):
"""Expects `extra_args` to be in the format of: key=val,key2=val,key3=val"""
if extra_args is None:
return {}
parts = extra_args.split(',')
return {k: v for k, v in (i.split('=') for i in parts)}
@task
def foo(extra_args=None):
I wanna be
the very best
like no one ever was
I'll farm engrams
and open chests
and abuse random drops
But when I find
strong enemies
I can't SUROS Regime
let g:netrw_list_hide='\.o,\.obj,*~,\.pyc,' "stuff to ignore when tab completing
let g:netrw_list_hide.='\.env,'
let g:netrw_list_hide.='\.env[0-9].,'
let g:netrw_list_hide.='\.git,'
let g:netrw_list_hide.='\.gitkeep,'
let g:netrw_list_hide.='\.vagrant,'
let g:netrw_list_hide.='\.tmp,'
let g:netrw_list_hide.='\.coverage$,'
let g:netrw_list_hide.='\.DS_Store,'
let g:netrw_list_hide.='__pycache__,'
[
{
"amount": 333540,
"business": "https:\/\/payments-api.tide.wave-dev.com\/business-profile\/b3af09b4-34d5-40d0-978d-0754d31489b4",
"delivery_date": null,
"fees": 1213,
"id": "64c8b2e5-0269-46cc-ab59-f707b706ae02",
"status": "failed",
"submissions": [
{

Keybase proof

I hereby claim:

  • I am nickpresta on github.
  • I am nickpresta (https://keybase.io/nickpresta) on keybase.
  • I have a public key whose fingerprint is 7BF0 5213 6E82 1BD3 17F2 DA29 64DC A9EE CB45 B39A

To claim this, I am signing this object:

@nickpresta
nickpresta / gist:34812e791e3d89498dee
Last active August 29, 2015 14:15
Sentry JavaScript
Validating the source map shows encoding errors on
https://github.com/lodash/lodash/blob/d2dc918a619d7207d214fd95fc1858d0578ab86e/lodash.js#L200
See validation errors here: http://i.imgur.com/U335kIQ.png
This leaves me with Sentry traces that look like: http://i.imgur.com/Qb12rL0.png
@nickpresta
nickpresta / slownet.go
Last active August 29, 2015 14:16
Create a "delayed" JavaScript file
// Usage: Send GET request to /<seconds> to wait <seconds> seconds
package main
import (
"net/http"
"strconv"
"time"
)
func main() {
@nickpresta
nickpresta / gist:e61dec7fbca5cbf843dd
Created April 30, 2015 15:12
Lodash string methods vs underscore.string vs other languages
// Lodash
_.padRight('', 5, 'x'); // === ''
// underscore.string
s.rpad('', 5, 'x'); // === 'xxxxx'
// Python
'{:x<5}'.format('') # == 'xxxxx'
// Ruby
go get github.com/NickPresta/go-wave-workshop
# It should return nothing is successful
# If it doesn't work, please HipChat me the output of `go env`
# and the error from the go get above
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.