Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Istvan l1x

🏠
Working from home
View GitHub Profile
View rocksdb.options.example.ini
# 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 Apr 23, 2019
JDK 13 on Alpine (Docker)
View Dockerfile
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 Apr 16, 2019
Disable Google's DNS servers in OpenWRT firewall /etc/firewall.user
View 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 Apr 16, 2019
Collections of tech used by me
View stack.md

Stack

Configuration files

Programming Languages

@l1x
l1x / aws.cli.ec2.md
Last active Mar 11, 2019
Some useful AWS CLI command examples
View aws.cli.ec2.md
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
View create_mojave_installer.iso.md
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 Jan 9, 2019
Apple goes mad
View wtf.md
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 Jan 9, 2019
Microsoft please give up software development and just buy startups going forward (thanks)
View why_i_hate_skype.md

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 Jan 4, 2019
Installing Python 3.6 for Tensorflow on MacOS
View Python.3.6.5.md
brew unlink python
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
pip3 install --upgrade pip setuptools wheel
@l1x
l1x / monte_carlo_pi_fast.md
Last active Oct 9, 2019
Monte Carlo Pi (Clojure)
View monte_carlo_pi_fast.md

Monte Carlo estimation for the value of π

Iteration 1

(defn pair
  []
  [(rand) (rand)])

(defn pairs
You can’t perform that action at this time.