Skip to content

Instantly share code, notes, and snippets.

@KetothXupack
KetothXupack / debuild_ubuntu_debian_package
Created November 14, 2018 18:10 — forked from GeoffWilliams/debuild_ubuntu_debian_package
Command to run to build debian packages on ubuntu, fixes bad-distribution-in-changes error, needed for the steps to patch a debian package listed at https://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/
# How to run debuild with lintian on ubuntu
# fixes error: bad-distribution-in-changes-file unstable
# Finished running lintian.
debuild -us -uc --lintian-opts --profile debian
@KetothXupack
KetothXupack / ld.gold.sh
Created October 24, 2018 23:13 — forked from daniel-j-h/ld.gold.sh
default to ld.gold on Ubuntu'ish
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
update-alternatives --config ld
ld --version
GNU gold
export CPP=cpp-5 gcc-5 g++-5
env CXXFLAGS='-march=native -flto -fuse-linker-plugin' cmake .. -DCMAKE_BUILD_TYPE=Release
@KetothXupack
KetothXupack / m3u8-to-mp4.md
Created September 23, 2018 22:13 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@KetothXupack
KetothXupack / haproxy.cfg
Created April 25, 2018 08:46 — forked from techotaku/haproxy.cfg
HAProxy to Nginx (Web + V2Ray WebSocket) + OpenConnect + SSH + ShadowsocksR (TLS OBFS)
defaults
timeout connect 5s
timeout client 24h
timeout server 24h
global
log /dev/log local0
frontend ssl
log global
net.ipv4.tcp_fastopen=3
net.ipv4.tcp_fastopen_key=b9b738a4-9cad4a74-4c832cbf-e20f561f
net.ipv4.tcp_fastopen=3
net.ipv4.tcp_fastopen_key=b9b738a4-9cad4a74-4c832cbf-e20f561f
@KetothXupack
KetothXupack / Notes.md
Created August 27, 2016 00:00 — forked from chrisvest/Notes.md
PrintCompilation on different versions of HotSpot VM

About PrintCompilation

This note tries to document the output of PrintCompilation flag in HotSpot VM. It was originally intended to be a reply to a blog post on PrintCompilation from Stephen Colebourne. It's kind of grown too big to fit as a reply, so I'm putting it here.

Written by: Kris Mok rednaxelafx@gmail.com

Most of the contents in this note are based on my reading of HotSpot source code from OpenJDK and experimenting with the VM flags; otheres come from HotSpot mailing lists and other reading materials listed in the "References" section.

This

@KetothXupack
KetothXupack / gpg-import-and-export-instructions.md
Created November 17, 2015 05:16 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@KetothXupack
KetothXupack / 0introduction.md
Created October 31, 2015 11:00 — forked from djspiewak/0introduction.md
Scala Collections Proposal

Collections Redesign Proposal

I'm going to start off by motivating what I'm doing here. And I want to be clear that I'm not "dissing" the existing collections implementation or anything as unproductively negative as that. It was a really good experiment, it was a huge step forward given what we knew back in 2.8, but now it's time to learn from that experiment and do better. This proposal uses what I believe are the lessons we can learn about what worked, what didn't work, and what is and isn't important about collections in Scala.

This is going to start out sounding really negative and pervasively dismissive, but bear with me! There's a point to all my ranting. I want to be really clear about my motivations for the proposal being the way that it is.

Problems

Generic Interfaces

Akka Cluster Implementation Notes

Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.

Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.

Akka Gossip

Gossip state

This is the Gossip state representation: