This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start a docker alpine container with exposed ports | |
docker run -d -p 6379:6379 redis:alpine | |
# Show images | |
docker images | |
# List running docker images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* filewatcher.js | |
* This file watcher application is written in node.js | |
* by Erickson Delgado. | |
* | |
*/ | |
var fs = require('fs') | |
, request = require('request') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |