Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ltran on github.
  • I am mrltran (https://keybase.io/mrltran) on keybase.
  • I have a public key ASDkFn97D9O7I4AGzQ18VaBcSQ3HDFbBDuqE1mA79D7BOQo

To claim this, I am signing this object:

@ltran
ltran / understanding-word-vectors.ipynb
Created January 10, 2020 18:35 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ltran
ltran / .gitconfig
Created June 4, 2019 16:50
Git common config
[color]
diff = auto
status = auto
branch = auto
ui = auto
[log]
date = local
[core]
excludesfile = ~/.gitignore
quotepath = false
func search(nums []int, target int) int {
nL := len(nums)
if nL == 0 {
return -1
} else if nL == 1 {
if nums[0] == target {
return 0
} else {
return -1
}

Keybase proof

I hereby claim:

  • I am ltran on github.
  • I am mrltran (https://keybase.io/mrltran) on keybase.
  • I have a public key ASA4MFWyYmY9D0QH9l8RAeIyAzTl3lMzdUj271GJcQWYwQo

To claim this, I am signing this object:

@ltran
ltran / BENCHMARK.md
Created January 18, 2017 00:05 — forked from montanaflynn/BENCHMARK.md
Kong Benchmark Setup

To reproduce Kong's benchmark please follow these instructions.

Create AWS Instances

Spin up three m3.medium EC2 ubuntu 14.04 instances with public DNS enabled and configure them for high network traffic by increasing these limits:

Added fs.file-max=80000 to /etc/sysctl.conf

Added the following lines to /etc/security/limits.conf

@ltran
ltran / gist:eaaa1d9351bd41a99e6a2d97fdbb4a99
Created July 5, 2016 21:51 — forked from sebboh/gist:f1dfe4f096746c45f3e9ea06a09743a0
Installing a Gem on Heroku from a Private GitHub Repo

Installing a Gem on Heroku from a Private GitHub Repo

Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.

Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.

This method does not add your OAuth token to Gemfile.lock. It uses bundle config to store your credentials, and allows you to configure Heroku to use environment variables when deploying.

  1. Generate an OAuth token from GitHub
@ltran
ltran / cute art
Last active November 9, 2015 19:16
Some cute things made from text, one liners
༼ つ ◕_◕ ༽つ
ᕕ( ᐛ )ᕗ
(╯°□°)╯︵ ┻━┻
┌∩┐(◣_◢)┌∩┐
¯\_(ツ)_/¯