This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const { Alchemy, Network } = require('alchemy-sdk'); | |
const ethers = require('ethers'); | |
const EthDater = require('ethereum-block-by-date'); | |
const config = { | |
apiKey: '3zNbANvcjr5yUHtnGKxXGdnX3dUYxL2X', | |
network: Network.ETH_MAINNET, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://gist.github.com/spicycode/1229612 | |
# https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html | |
# 0 is too far from ` | |
set -g base-index 1 | |
# detach | |
bind -n C-e detach-client | |
# create new tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: https://serverfault.com/a/351154 | |
cmd /c "start rundll32 sysdm.cpl,EditEnvironmentVariables" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get env var | |
function get_env() { | |
VAR=$(grep ${1} .env) | |
echo ${VAR#*=} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InvoiceLineId | InvoiceId | TrackId | UnitPrice | Quantity | |
---|---|---|---|---|---|
1 | 1 | 2 | 0.99 | 1 | |
2 | 1 | 4 | 0.99 | 1 | |
3 | 2 | 6 | 0.99 | 1 | |
4 | 2 | 8 | 0.99 | 1 | |
5 | 2 | 10 | 0.99 | 1 | |
6 | 2 | 12 | 0.99 | 1 | |
7 | 3 | 16 | 0.99 | 1 | |
8 | 3 | 20 | 0.99 | 1 | |
9 | 3 | 24 | 0.99 | 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo sntp -sS pool.ntp.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# create alfred-backup folder | |
mkdir -p alfred-backup/preferences/features/websearch | |
# prefs.plist | |
cp ~/Library/Application\ Support/Alfred/Alfred.alfredpreferences/preferences/features/websearch/prefs.plist \ | |
alfred-backup/preferences/features/websearch | |
# resources (images) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "zlargon" | |
git config --global user.email "[email protected]" | |
git config --global color.ui true | |
git config --global core.editor vim | |
git config --global core.ignorecase true | |
git config --global alias.br branch | |
git config --global alias.co checkout | |
git config --global alias.cp cherry-pick | |
git config --global alias.st stash | |
git config --global alias.sub submodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET GLOBAL local_infile = true; | |
SHOW GLOBAL VARIABLES LIKE 'local_infile'; | |
LOAD DATA LOCAL INFILE '<file.csv>' | |
INTO TABLE '<table_name>' | |
COLUMNS TERMINATED BY ',' | |
OPTIONALLY ENCLOSED BY '"' | |
ESCAPED BY '"' | |
LINES TERMINATED BY '\r\n' | |
IGNORE 1 LINES; -- ignore the field names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat INPUT_FILE | sed 's/^/PREFIX/' | sed 's/$/SIFFIX/' > OUTPUT_FILE |
NewerOlder