This file contains hidden or 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
# WinKey | |
set $mod Mod4 | |
# Set resulotion | |
exec "xrandr --output eDP-1 --mode 1600x900" | |
# Set background | |
exec "feh --bg-fill /home/assafmo/Pictures/Wallpapers/IMG_20180929_063914.jpg" | |
# Natural scrolling (xinput list -> get device id -> xinput list-props $id -> get libinput Natural Scrolling Enabled id) |
This file contains hidden or 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 | |
ssh -D 1080 -N user@proxy-server & # The & won't work with password authentication | |
PROXY_PID="$!" | |
curl -x socks5://localhost:1080 https://google.com | |
kill -TERM "$PROXY_PID" |
This file contains hidden or 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
# ~/.config/fish/config.fish | |
set -gx GOPATH /home/lala/workspace/go | |
set -gx PATH $PATH /usr/local/go/bin $GOPATH/bin | |
function fish_prompt | |
set_color --bold $fish_color_cwd | |
echo -n (prompt_pwd) | |
set_color normal | |
echo -n ' > ' |
This file contains hidden or 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 | |
docker pull docker.elastic.co/kibana/kibana:7.2.0 | |
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.2.0 | |
docker run --name some-elastic -e 'discovery.type=single-node' -d --restart always -p 9200:9200 docker.elastic.co/elasticsearch/elasticsearch:7.2.0 | |
docker run --name some-kibana -d --restart always --link some-elastic:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.2.0 |
This file contains hidden or 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 | |
set -e | |
## | |
# CPU scaling_governor=performance | |
## | |
printf 'Setting scaling_governor to performance... ' | |
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor > /dev/null |
This file contains hidden or 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 some.log | jq -R 'fromjson? | .date' |
This file contains hidden or 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 | |
curl -s http://bootstrap.mainnet.enigma.co:26657/net_info | | |
jq -cr '.result.peers[] | [.node_info.id,.remote_ip,.node_info.listen_addr] | @csv' | | |
tr -d \" | | |
tr , @ | | |
perl -pe 's#\@tcp://.+?:#:#g' | | |
sort > /tmp/peers.txt | |
echo "# Generated at $(date -u --rfc-3339=seconds) by https://gist.github.com/assafmo/a39fdb535f74ce2d6493a1a3f695e4ca" > /home/ubuntu/peers/peers.txt |
This file contains hidden or 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 | |
seq 1000 1000 $(enigmacli status | jq -r .sync_info.latest_block_height) | | |
parallel --bar -P 1 --lb "printf '{} ' ; enigmacli q distribution community-pool --height {} | jq -r '.[].amount'" | | |
awk 'BEGIN{print "block_height,community_pool_scrt"; print "0,0"} {print $1 "," $2/10^6}' |
This file contains hidden or 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 | |
docker ps -a | | |
tail -n +2 | | |
awk '{print $1}' | | |
xargs -r docker rm -f | |
docker images | | |
tail -n +2 | | |
awk '{print $3}' | | |
xargs -r docker rmi -f |
This file contains hidden or 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
# Put in /etc/systemd/system/script-name.service | |
# Then run `sudo systemctl enable script-name` | |
[Unit] | |
Description=bla bla | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/mount -o remount,exec /dev | |
RemainAfterExit=true |