Skip to content

Instantly share code, notes, and snippets.

I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer.
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc).
# Install rvm (no sudo!)
# ------------------------------------------------------
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
source ~/.rvm/scripts/rvm
rvm install ree-1.8.7-2010.02
@levicook
levicook / gist:4132037
Created November 22, 2012 16:37
modeling friends and calculating mutual friends w/ mongodb
// ------------------------------------------------------------------
// Friend collection, where _id is a user.Id and Friends is a list, of user.Id.
// Note: friending and unfriending is a two step operation in this scheme:
> db.friends.find()
{ "_id" : 1, "friends" : [ 2, 3, 4 ] }
{ "_id" : 2, "friends" : [ 1, 3, 5 ] }
{ "_id" : 3, "friends" : [ 1, 2, 4, 5 ] }
{ "_id" : 4, "friends" : [ 1, 3, 5 ] }
{ "_id" : 5, "friends" : [ 2, 3, 4 ] }
@levicook
levicook / _template.json
Last active May 10, 2023 21:50
Characters from Better Call Saul
{
"name": "",
"description": "",
"image": ""
}
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ",
{
"encoding": "jsonParsed",
"filters": [ ]
}
@levicook
levicook / .tmux.conf
Last active September 13, 2022 13:10
Minimal sane tmux conf for OSX.
# play nice with OSX copy/paste tools
set -g default-command "reattach-to-user-namespace /bin/bash --login"
bind y run-shell "tmux save-buffer - | reattach-to-user-namespace pbcopy"
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind | split-window -h # C-a | to create horizontal pane
bind - split-window -v # C-a - to create vertical pane
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
info: syncing channel updates for '1.62.1-x86_64-unknown-linux-gnu'
info: latest update on 2022-07-19, rust version 1.62.1 (e092d0b6b 2022-07-16)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
@levicook
levicook / all-traits
Last active April 17, 2022 02:26
xalt 🤝 xape?
XALT Traits
BACKGROUND
BODY
EXALTED_STAT
FUR
GLASSES
HEAD
MOUTH
❤️
@levicook
levicook / curl.bash
Created September 9, 2021 13:36
token accounts for a specific mint
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
{
"encoding": "jsonParsed",
"filters": [
@levicook
levicook / dape-mints.json
Last active January 4, 2022 06:51
Ape Mint Hashes
[
"127RACV8SfCbbVrLdRbukh63zCDcubW4xVGh6aV6pnZi",
"12BL2dkEvZFndkoAYW8hywJyjyqWfwWkVXhe1y4todSv",
"12C4w448q4nkeBa8Nv864mBD6m2gYk55uAyGHaA6SewL",
"12Cj2zaVkaxjWrCbbacYVWMTsRdAJnZVLe8WsAoG57mf",
"12Hzt883ocDZnorzCVi2u8KPZiwLZtpSmtQKwMHz5pUJ",
"12JF4YdDzWvhnr36ThC8L7C6RxkhQcJAGRJ6Rhestt1U",
"12N6ehGsoe7LFHFxtXFxK8z286PKA5gpMApFVqWpaGiu",
"12pKJHBUs9vnwNvj3MexoQ1rSCGkwwXQjLt5cJY9AqfW",
"12qWDHB66K1pDUzcod8iuTpUcQD6uUjFaig776rE6uXv",
node_modules
package-lock.json