Skip to content

Instantly share code, notes, and snippets.

View davidmontoyago's full-sized avatar

David Montoya davidmontoyago

View GitHub Profile
@davidmontoyago
davidmontoyago / infinite-list-view.js
Last active December 21, 2015 16:49
Infinite scroll list view with Backbone.js - Got some inspiration from @kjantzer: https://gist.github.com/kjantzer/4021245
/**
* Extend for infinite scrolling capabilities.
*
* "addMore" function must be implemented in the child view.
* The infinite scrolling is disabled by default, must be enabled from the child view when initialized or ready.
*
* Uses jquery waypoints - http://imakewebthings.com/jquery-waypoints/
*
* Config options:
* - endOfList: id of the way-point element
@davidmontoyago
davidmontoyago / inspect-with-tab-key
Last active December 25, 2015 19:39
Inspect dom elements in Chrome as you move with the Tab key.
$("body *").on('keydown', function(event) {
var keyCode = event.which;
if (keyCode == 9) {
console.log(event.target);
inspect(event.target);
}
event.stopPropagation();
});
@davidmontoyago
davidmontoyago / open-chrome-no-security
Last active December 29, 2015 00:19
Open new Chrome window with disabled security. Use it to execute JS apps without using a local app server and avoid the “Cross origin requests are only supported for HTTP.”
open -na "Google Chrome" --args --disable-web-security --user-data-dir=/tmp/junk
[core]
safecrlf = true
pager = "less -FX"
excludesFile = .gitignore
editor = vim
[alias]
co = checkout
ci = commit
st = status
br = branch
@davidmontoyago
davidmontoyago / bang.sh
Created June 25, 2015 13:05
Average load time with curl
#!/bin/bash
total_load_time=0
total_runs=10
if [ -z "$1" ]; then
host="http://localhost:3000"
else
host=`echo $1`
fi

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@davidmontoyago
davidmontoyago / gistsfrommyslack.go
Created February 1, 2020 05:02
this is a zap integration
package main
import "fmt"
func main() {
fmt.Println("hello from slack")
}
@davidmontoyago
davidmontoyago / gistsfrommyslack.go
Created February 1, 2020 05:47
this is a zap integration
package main
import "fmt"
func main() {
fmt.Println("hello again from slack")
}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: vault
namespace: vault
annotations:
kubernetes.io/ingress.class: "nginx-vault"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/service-upstream: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
containers:
- name: vault
image: vault:1.6.2
args:
- "server"
- "-config=/home/vault/config/vault.hcl"
env:
- name: VAULT_K8S_POD_NAME
valueFrom:
fieldRef: