Skip to content

Instantly share code, notes, and snippets.

View ssl on lvh.me
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
View 1. list-candy-machines.sh
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 Sep 13, 2022
Minimal sane tmux conf for OSX.
View .tmux.conf
# 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
View sui-fullnode-woes.log
$ 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 / gist:4132037
Created Nov 22, 2012
modeling friends and calculating mutual friends w/ mongodb
View gist:4132037
// ------------------------------------------------------------------
// 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 / all-traits
Last active Apr 17, 2022
xalt 🤝 xape?
View all-traits
XALT Traits
BACKGROUND
BODY
EXALTED_STAT
FUR
GLASSES
HEAD
MOUTH
❤️
@levicook
levicook / curl.bash
Created Sep 9, 2021
token accounts for a specific mint
View curl.bash
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 Jan 4, 2022
Ape Mint Hashes
View dape-mints.json
[
"127RACV8SfCbbVrLdRbukh63zCDcubW4xVGh6aV6pnZi",
"12BL2dkEvZFndkoAYW8hywJyjyqWfwWkVXhe1y4todSv",
"12C4w448q4nkeBa8Nv864mBD6m2gYk55uAyGHaA6SewL",
"12Cj2zaVkaxjWrCbbacYVWMTsRdAJnZVLe8WsAoG57mf",
"12Hzt883ocDZnorzCVi2u8KPZiwLZtpSmtQKwMHz5pUJ",
"12JF4YdDzWvhnr36ThC8L7C6RxkhQcJAGRJ6Rhestt1U",
"12N6ehGsoe7LFHFxtXFxK8z286PKA5gpMApFVqWpaGiu",
"12pKJHBUs9vnwNvj3MexoQ1rSCGkwwXQjLt5cJY9AqfW",
"12qWDHB66K1pDUzcod8iuTpUcQD6uUjFaig776rE6uXv",
View .gitignore
node_modules
package-lock.json
View dape-holders.log
2HCaiPHxWFb4WjdqZKbjVa7Y8TDa1pjF4XadKNmSQcXz
Dxc5B7Lwtp3kr4SaPSU26qgDp6VNVUP7ZFZonBBSPfSD
4eCjbUCE3JwC3quzdvLZwRnn7rMB57voRPZLXmDNCeYV
HFPaT6WKk9SkwtYVZ5m5Sqw7ZbyehGu9GHjsctigm49S
CQUk6Djk6ZopPps1gZwzpgp7X7nFwyzcRp4sDauGpDHo
DmrkajG3SrTXnYSYxGRfkzfvhkevD6RdtFk4SdLC2G6Q
FRgYM8AUf2nMLa1prSwUiX6SmzWQdXywNYERu2cx1y1p
AxXhiZKyFHxgkjDF6XpGZ8SSo9sPAT1H2VR4sUiqrm83
3D49QorJyNaL4rcpiynbuS3pRH4Y7EXEM6v6ZGaqfFGK
GRnx8CHP9oabu2PScVBxDXb2dExQ99oqW6Uh3Sn1Dkdm