Skip to content

Instantly share code, notes, and snippets.

View ericksond's full-sized avatar

Erickson Delgado ericksond

View GitHub Profile
@ericksond
ericksond / main.go
Created September 14, 2016 17:58
HTTP POST Request Dump to HTTP/1.x Wire
package main
import (
"fmt"
"log"
"net/http"
"net/http/httputil"
)
func main() {
@ericksond
ericksond / docker_guides.txt
Last active September 14, 2016 18:04
docker
# Start a docker alpine container with exposed ports
docker run -d -p 6379:6379 redis:alpine
# Show images
docker images
# List running docker images
@ericksond
ericksond / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ericksond
ericksond / filewatcher.js
Created April 9, 2014 19:22
node.js filewatcher that sends signal to a remote api when triggered
/*
*
* filewatcher.js
* This file watcher application is written in node.js
* by Erickson Delgado.
*
*/
var fs = require('fs')
, request = require('request')
@ericksond
ericksond / nginx-dynamic-cache.conf
Created April 9, 2014 19:20
nginx dynamic caching using proxy_store with reverse-proxy fallback
# servers to proxy to
upstream servers {
server 10.0.0.1;
server 10.0.0.2;
}
server {
listen 80;
server_name www.domain.com;
server_name www2.domain.com
@ericksond
ericksond / pgp.py
Created April 9, 2014 19:14
python module for secureftp with mget, mput and pgp support
import os, subprocess, shlex
class pgp(object):
def __init__(self, xfile):
self.xfile = xfile
def encrypt(self, recipient):
cmd = "gpg -e --trust-model always --yes -o "+ self.xfile +".pgp -r "+ recipient +" "+ self.xfile
try: