A guide to setup your WSL with Hyper and zsh
- Follow the very thorough instructions here
- Download Hyper.js here - I went with the 'hyperblue' theme.
{"version":"0.1.0","name":"pump","instructions":[{"name":"initialize","docs":["Creates the global state."],"accounts":[{"name":"global","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setParams","docs":["Sets the global state parameters."],"accounts":[{"name":"global","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"feeRecipient","type":"publicKey"},{"name":"initialVirtualTokenReserves","type":"u64"},{"name":"initialVirtualSolReserves","type":"u64"},{"name":"initialRealTokenReserves","type":"u64"},{"name":"tokenTotalSupply","type":"u64"},{"name":"feeBasisPoints","type":"u64"}]},{"name":"create","docs":["Creates a new coin and bonding curve."],"accounts":[{"name":"mint","isMut":true,"isSigner":true},{"n |
#!/usr/bin/env sh | |
# LATEST VERSION OF THIS SCRIPT: https://gist.github.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4 | |
# FORKED FROM: https://gist.github.com/ddwang/0046da801bcb29d241869d37ad719394 | |
# 1) No longer has a hard-coded COMMIT | |
# 2) Auto-symlinks a "code" script to avoid wslCode.sh breaking | |
# HOW TO INSTALL: | |
# 1) Remove "c:\Users\<USER_NAME>\AppData\Local\Programs\cursor\resources\app\bin" from Windows Environment Settings | |
# 2) Modify this script with your Windows <USER_NAME> (NOT your WSL username) in the VSCODE_PATH variable |
import functools | |
def decorator(function): | |
"""A general decorator function""" | |
@functools.wraps(function) | |
def wrapper(*args, **kwargs): | |
# Write decorator function logic here | |
# Before function call |
const { | |
html, | |
render, | |
useState, | |
useEffect, | |
useLayoutEffect | |
} = await import('https://unpkg.com/htm/preact/standalone.module.js'); | |
const { |
This has been incorporated in a small library.
You often have several docker containers and applications which work together in the locel development environment. You need the following communications:
You have a way to connect localhost-to-docker using -p
(port-mapping) docker option.
For instance, you can start PostgreSQL container using -p 0.0.0.0:5432:5432
and then connect like to normal PostgreSQL
You have often several docker containers and applications which work together on local development. You need the following communications:
You have a way to connect localhost-to-docker using -p
(port-mapping) docker option.
For instance, you can start PostgreSQL container using -p 0.0.0.0:5432:5432
and then connect like to normal PostgreSQL
# All units in usecs (µsec) comparing Python 2.7 | 3.7. | |
# Last updated: 2019-02-11 | |
# MacBook Pro (15-inch, 2016) | |
# macOS 10.14.3 | |
# 2.7 GHz Intel Core i7 | |
# 16 GB 2133 MHz LPDDR3 | |
python -m timeit "200 <= 250 < 300" # 0.0354 | 0.059 | |
python2.7 -m timeit "250 in xrange(200, 300)" # 1.25 |