Skip to content

Instantly share code, notes, and snippets.

@kylegrantlucas
kylegrantlucas / application.go
Created December 4, 2018 20:11
Interface example
package main
import "fmt"
type X interface {
GetValue() string
}
type Y struct {
Value string
@kylegrantlucas
kylegrantlucas / docker_setup.sh
Created January 10, 2018 00:33
Docker Setup
#!/bin/bash
docker create --cap-add=NET_ADMIN --device=/dev/net/tun --name=pia \
--dns 209.222.18.222 --dns 209.222.18.218 \
-e 'REGION=xxxxxx' \
-e 'USERNAME=xxxxx' \
-e 'PASSWORD=xxxxx' \
--restart always \
-p 9091:9091 -p 51413:51413 -p 51413:51413/udp -p 9117:9117 \

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.5
-- Dumped by pg_dump version 9.5.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
@kylegrantlucas
kylegrantlucas / gist:7d1b0252b2f9060797c0
Created April 19, 2015 23:36
Metaprogrammed API Class
class ApiName
include HTTParty
base_uri 'api_uri'
# List of endpoints to instantiate instance methods for
# format example: {users: :get, comments: [:get, :post, :delete]}
ENDPOINTS = {users: :get}
def initialize(api_key = nil, api_secret = nil, options = {})
@options = options.merge!({api_key: api_key, api_secret: api_secret})
@kylegrantlucas
kylegrantlucas / 0_reuse_code.js
Created August 21, 2014 23:29
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