Skip to content

Instantly share code, notes, and snippets.

💭
I'm a broken fence in the yard of annoyance.

whitequark whitequark

💭
I'm a broken fence in the yard of annoyance.
Block or report user

Report or block whitequark

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View schema.sql
DROP TABLE IF EXISTS irclog;
CREATE TABLE irclog (
id SERIAL,
channel VARCHAR(30),
nick VARCHAR(40),
opcode VARCHAR(20),
timestamp INT,
line TEXT,
oper_nick VARCHAR(40),
payload TEXT,
View crashwrapper.sh
#!/bin/sh
reset() {
ssh lab.m-labs.hk './miniconda/bin/artiq_flash -m qc1 start'; sleep 1s
}
ping -w 30 -i 0.5 -c 2 kc705.lab.m-labs.hk
timeout 30s artiq_run -vv $1 2>&1 | tee /tmp/artiq_run$$
if grep KERNEL_FINISHED /tmp/artiq_run$$; then
exit 0 # no crash
@whitequark
whitequark / .xsession
Last active Mar 18, 2019
.xsession that starts up a minimal plasma-less KDE 5 environment with i3wm
View .xsession
#!/bin/sh
configDir=${HOME}/.config
mkdir -p $configDir
cat >$configDir/startupconfigkeys <<EOF
kcminputrc Mouse cursorTheme 'breeze_cursors'
kcminputrc Mouse cursorSize ''
ksplashrc KSplash Theme Breeze
ksplashrc KSplash Engine KSplashQML
@whitequark
whitequark / binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch
Last active Aug 29, 2015
libbfd patch to correctly apply data relocations in .eh_frame and .gcc_except_table sections
View binutils-2.25.1-or1k-R_PCREL-pcrel_offset.patch
--- a/bfd/elf32-or1k.c 2015-08-02 15:45:34.275922535 +0300
+++ b/bfd/elf32-or1k.c 2015-08-02 15:45:36.635931622 +0300
@@ -199,7 +199,7 @@
FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
HOWTO (R_OR1K_16_PCREL,
View gist:445bf1378a088266f446
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+RC4:EDH+aRSA:EECDH:RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!SSLv3;
View gist:af45f707bd241ded2cfa
In a magic kingdom there is a granite cliff in the shape of a cube 1km long at the edge. Once a century, a raven sits at the cliff and cleans his beak, eroding the cliff by 0.0001g. The amount of years that will pass before the cliff is ground to dust is less than Nᴀ.
View gist:cc737ffcb8896e4d7b91
#!/bin/sh
sudo add-apt-repository 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main'
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install llvm-3.6-dev
View gist:ed754be94462f1a0028f
>KJ633805
AGCAAAAGCAGGTCAAATATATTCAATATGGAAAGAATAAAAGAACTAAGAGATTTGATGTCACAGTCTC
GCACTCGCGAGATACTGACAAAAACAACTGTGGACCATATGGCCATAATCAAGAAATATACATCAGGAAG
ACAGGAGAAGAATCCTGCCCTTAGGATGAAGTGGATGATGGCAATGAAATATCCAATTACGGCAGACAAA
AGGATAATGGAGATGATCCCGGAAAGAAATGAGCAAGGTCAGACCCTTTGGAGCAAGACAAATGATGCTG
GATCAGACAGAGTGATGGTGTCACCTCTGGCTGTGACGTGGTGGAACAGAAATGGACCAACGACAAGCAC
AGTCCATTATCCAAAGGTCTATAAAACCTATTTTGAAAAGGTCGAAAGGCTAAAACATGGAACCTTCGGC
CCCGTTCACTTCAGAAACCAGGTTAAAATACGCCGCAGGGTCGACATAAACCCGGGCCATGCAGATCTTA
GTGCTAAAGAAGCACAGGATGTCATCATGGAGGTCGTATTCCCAAACGAAGTTGGAGCCAGAATATTGAC
ATCAGAGTCACAGTTAACGATTACCAAGGAAAAGAAGAAGGAGCTTCAGGACTGCAAAATTGCCCCTTTA
You can’t perform that action at this time.