@@ -5,11 +5,6 @@ export SOCIALBLADE_API="(redacted)"
5
5
export SOCIALBLADE_EMAIL="
[email protected] "
6
6
export SOCIALBLADE_TOKEN="(redacted)"
7
7
export SOCIAL_BLADE_DISCORD_TOKEN="Bot (redacted)"
8
- export SOCIALBLADE_EPOCH="1202446179000"
9
- sb_snow () {
10
- epoch=$(($1 >> 23 + $SOCIALBLADE_EPOCH))
11
- date -r $(($epoch/1000))
12
- }
13
8
14
9
# Twitch API
15
10
export TWITCH_OAUTH="(redacted)"
@@ -21,8 +16,6 @@ export SPOTIFY_CLIENT_SECRET="(redacted)"
21
16
22
17
alias icloud="~/Library/Mobile\ Documents/com~apple~CloudDocs/"
23
18
24
- alias k="k9s --readonly"
25
-
26
19
if [ $TERM = 'xterm-kitty' ]; then
27
20
export PATH=/Applications/kitty.app/Contents/MacOS/kitty:$PATH
28
21
@@ -56,6 +49,25 @@ test_https() {
56
49
curl --insecure -vvI https://$1 -H "Host: $2" 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'
57
50
}
58
51
52
+ mc_edit() {
53
+ if [ -z "$1" ]
54
+ then
55
+ echo "What're you going to edit, the void?";
56
+ echo "mc_edit <input>"
57
+ echo "mc_edit <input> <output>"
58
+ else
59
+ # If no second arg make the output the same as the input
60
+ if [ -z "$2" ]
61
+ then
62
+ 2=$1
63
+ fi
64
+ TMP=$(openssl rand -base64 8 | tr -dc '[:alnum:]\n\r')
65
+ mc cat $1 > /tmp/$TMP.${1##*.}
66
+ $EDITOR /tmp/$TMP.${1##*.}
67
+ mc cp /tmp/$TMP.${1##*.} $2
68
+ fi
69
+ }
70
+
59
71
alias dark="~/.config/kitty/switch_theme.sh dark"
60
72
alias light="~/.config/kitty/switch_theme.sh light"
61
73
0 commit comments