Skip to content

Instantly share code, notes, and snippets.

View l1x's full-sized avatar
🏠
Working from home

Istvan l1x

🏠
Working from home
View GitHub Profile
set -g prefix C-a
unbind C-b
bind C-a send-prefix
setw -g mode-keys vi
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# This is a RocksDB option file.
#
# For detailed file format spec, please refer to the example file
# in examples/rocksdb_option_file_example.ini
#
[Version]
rocksdb_version=5.18.3
options_file_version=1.1
@l1x
l1x / Dockerfile
Last active April 23, 2019 15:48
JDK 13 on Alpine (Docker)
FROM alpine:latest as build
ADD https://download.java.net/java/early_access/alpine/16/binaries/openjdk-13-ea+16_linux-x64-musl_bin.tar.gz /opt/jdk/
RUN tar -xzvf /opt/jdk/openjdk-13-ea+16_linux-x64-musl_bin.tar.gz -C /opt/jdk/
RUN ["/opt/jdk/jdk-13/bin/jlink", "--compress=2", \
"--module-path", "/opt/jdk/jdk-13/jmods/", \
"--add-modules", "java.base", \
"--output", "/jlinked"]
@l1x
l1x / firewall.user
Created April 16, 2019 08:31
Disable Google's DNS servers in OpenWRT firewall /etc/firewall.user
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
iptables -I zone_lan_forward -p tcp -d 8.8.8.8 --dport 53 -j DROP
iptables -I zone_lan_forward -p udp -d 8.8.8.8 --dport 53 -j DROP
@l1x
l1x / stack.md
Last active April 16, 2019 21:37
Collections of tech used by me

Stack

Configuration files

Programming Languages

@l1x
l1x / aws.cli.ec2.md
Last active March 11, 2019 11:39
Some useful AWS CLI command examples
aws ec2 describe-instances --filters "Name=tag:Name,Values=name-tag-of-your-instance" |\
jq -r '.Reservations[].Instances[].NetworkInterfaces[].PrivateIpAddress'
aws ec2 describe-instances --filters "Name=instance-type,Values=r5.2xlarge" |\
jq -r '.Reservations[].Instances[].InstanceId' | wc -l
hdiutil create -o /tmp/Mojave.cdr -size 8000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build

sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
OR
sudo ~/Downloads/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
@l1x
l1x / wtf.md
Created January 9, 2019 14:59
Apple goes mad
netstat -rn
sudo route delete -inet -ifscope en1 -net 224.0.0.251
sudo route delete -inet -ifscope en1 -net 255.255.255.255/32
sudo route delete -inet -ifscope en1 -net 255.255.255.255
sudo route delete -inet -ifscope en1 -net 192.168.1.196
sudo route delete -inet -ifscope en1 -net 224.0.0/4
sudo route delete -inet6 -ifscope en1 -net 224.0.0/4
sudo ifconfig utun0 destroy
sudo ifconfig utun0 down
@l1x
l1x / why_i_hate_skype.md
Created January 9, 2019 09:36
Microsoft please give up software development and just buy startups going forward (thanks)

You guys suck astronomical balls

You might not have the latest participant list because the server is down. 
You were disconnected from the IM conversation. Skype for Business will try to reconnect you. 
You might not have the latest participant list because the server is down. 
The participant list is now current. 
Your connection to the IM conversation has been restored. Messages sent by other contacts while you were not in the conversation will not appear. 
@l1x
l1x / Python.3.6.5.md
Created January 4, 2019 09:22
Installing Python 3.6 for Tensorflow on MacOS
brew unlink python
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
pip3 install --upgrade pip setuptools wheel