This file contains 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
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
This file contains 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
#include <iostream> | |
struct A { | |
int a; | |
const A operator*(const A& other) const { | |
std::cout << "A1: " << this->a << " A2: " << other.a << "\n"; | |
return *this; | |
} | |
}; |
This file contains 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
/* gcc -std=c99 -fPIC -shared -Wl,-soname,glvsync.so glvsync.c -o glvsync.so | |
* gcc -m32 -std=c99 -fPIC -shared -Wl,-soname,glvsync.so glvsync.c -o glvsync.so (for 32bit) | |
* | |
* Force VSYNC interval on OpenGL applications | |
* Alternatively can also try FPS locking a OpenGL program | |
* Usage: LD_PRELOAD="/path/to/glvsync.so" ./program | |
*/ | |
#define _GNU_SOURCE | |
#include <dlfcn.h> |
This file contains 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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
# To use this shell.nix on NixOS your user needs to be configured as such: | |
# users.extraUsers.adisbladis = { | |
# subUidRanges = [{ startUid = 100000; count = 65536; }]; | |
# subGidRanges = [{ startGid = 100000; count = 65536; }]; | |
# }; |
This file contains 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
package main | |
import ( | |
"sync" | |
"github.com/Shopify/ghostferry" | |
"github.com/Shopify/ghostferry/copydb" | |
"github.com/sirupsen/logrus" | |
) |
This file contains 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
#!MC 1100 | |
$!ALTERDATA | |
EQUATION = '{s11} = {dUdX}' | |
$!ALTERDATA | |
EQUATION = '{s12} = 0.5*({dUdY}+{dVdX})' | |
$!ALTERDATA | |
EQUATION = '{s13} = 0.5*({dUdZ}+{dWdX})' | |
$!ALTERDATA | |
EQUATION = '{s22} = {dVdY}' | |
$!ALTERDATA |
This file contains 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
W530: | |
Running flashbench | |
4MiB 14M/s | |
2MiB 18M/s | |
1MiB 18M/s | |
512KiB 18.4M/s | |
256KiB 17.7M/s | |
128KiB 17.9M/s | |
64KiB 17.3M/s |
This file contains 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
// To use this script: | |
// - For chrome, install https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en | |
// - For firefox, install https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ | |
// ==UserScript== | |
// @name Facebook AdBlock | |
// @namespace facebook_adblock | |
// @include https://www.facebook.com/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
This file contains 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 | |
SAVE_BASE=~/Seafile/Public/gamesaves/RimWorld | |
switch_save() { | |
version=$1 | |
cd ~/.config/unity3d/Ludeon\ Studios | |
rm RimWorld | |
ln -s ${SAVE_BASE}${version}$2 RimWorld | |
} |
This file contains 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 | |
echo 'log-queries' > /etc/dnsmasq.conf | |
service network-manager restart | |
tail -f /var/log/syslog |
NewerOlder