# remove drop shadow on screenshots
defaults write com.apple.screencapture disable-shadow -bool true && killall SystemUIServer
# git push automatic remote tracking
git config --global --add --bool push.autoSetupRemote true
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
// signatures | |
// (root) | |
// (root, inner) | |
// (root, {}) | |
// (root, {}, inner) | |
// inner = '' || [] - array can have text or html els | |
// {} = options i.e. onclick, class, id, etc. | |
var signatures = { | |
1: function(root) { |
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/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
# Update: there is a way now, just haven't updated yet | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install mas | |
read -p "Press any key to continue... " -n1 -s | |
echo | |
mas install 1176895641 # Spark |
error TS1036: Statements are not allowed in ambient contexts
=== erronious semi colon (very human)
Doesn't actually make type safe code. If you do spread operators or destructuring you are doomed.
What would make typescript useful is if it removed the need for ternary statements for property accessors.
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
du -hs * | sort -rh | head -5 | |
# fix older than 30 days | |
find -name "*.log" /var/lib/rundeck -type f -mtime +30 -exec rm -f {} \; |
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
Enum.filter(interfaces, fn i -> List.starts_with?(Tuple.to_list(elem(i, 0)), [10, 242]) end) |> hd |> elem(0) |
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
import csv | |
import os | |
from types import SimpleNamespace | |
from utils.logging import logger | |
PROJECT_PATH = os.path.abspath(os.path.dirname(__name__)) | |
def run(): |
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
APP_ENV=testing | |
APP_KEY=base64:blahblah | |
APP_DEBUG=true | |
APP_LOG_LEVEL=debug | |
APP_URL=http://localhost | |
DB_CONNECTION=mysql | |
DB_HOST=mysql | |
DB_PORT=3306 | |
DB_DATABASE=homestead |
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
# {:httpoison, "~> 1.6"} in mix.exs -> deps | |
defmodule DockerEvents do | |
use GenServer | |
def start_link(opts \\ []) do | |
GenServer.start_link(__MODULE__, :ok, opts) | |
end | |
def init(:ok) do | |
sock = URI.encode_www_form("/var/run/docker.sock") |
root@ip-10-0-0-212:~# # from community
root@ip-10-0-0-212:~# apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community zerotier-one
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/2) Installing zerotier-one (1.4.6-r0)
(2/2) Installing zerotier-one-openrc (1.4.6-r0)
Executing busybox-1.30.1-r2.trigger
OK: 268 MiB in 94 packages
NewerOlder