Skip to content

Instantly share code, notes, and snippets.

View lukateras's full-sized avatar
🖤
Power to *you* <:

Luka Teras lukateras

🖤
Power to *you* <:
View GitHub Profile
FILE "example.bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
-module(choir).
-export([start/0, start_world/0, say/1, say/3]).
start() -> register(?MODULE, spawn(fun loop/0)).
loop() ->
receive {Message, Voice} ->
os:cmd(io_lib:format("say -v '~s' '~s'", [Voice, Message])),
loop()
end.
diff -r 59f916c737be keydb.ml
--- a/keydb.ml Tue Oct 23 00:56:31 2018 +0000
+++ b/keydb.ml Tue Jan 22 14:09:31 2019 +0300
@@ -1166,6 +1166,12 @@
try
if has_hash hash then [] else
let keyid = Fingerprint.keyid_from_key ~short:true key in
+ let keyid_long = Fingerprint.keyid_to_string ~short:false (Fingerprint.keyid_from_key ~short:false key) in
+ plerror 4 "considering keyid %s" keyid_long;
+ if List.mem keyid_long [
@lukateras
lukateras / hq9+.rb
Last active January 29, 2019 16:57
@accumulator = 0
@beer = ''; 97.times do |n|
@beer << "
#{99-n} bottles of beer on the wall,
#{99-n} bottles of beer.
Take one down and pass it around,
#{98-n} bottles of beer on the wall.
"
end; @beer << "
2 bottles of beer on the wall,
@lukateras
lukateras / cljack-in
Last active February 1, 2019 07:57
Project-independent nREPL setup for Clojure CLI
#!/bin/sh
exec clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.20.0"}}}' \
-e '(require `cider-nrepl.main)
(cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
#!/bin/sh
STEAM_PATH=$HOME/.steam/debian-installation
cd "$STEAM_PATH/steamapps/common/Divinity Original Sin 2"
rm -r bin
ln -s DefEd/bin .
rm bin/SupportTool.exe
@lukateras
lukateras / config.seed
Last active April 11, 2019 03:12
OpenWrt .config for Zyxel Keenetic (w/ LuCI)
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_rt305x=y
CONFIG_TARGET_ramips_rt305x_DEVICE_kn=y
CONFIG_CLEAN_IPKG=y
CONFIG_LUCI_SRCDIET=y
# CONFIG_PACKAGE_kmod-ppp is not set
CONFIG_PACKAGE_libiwinfo-lua=y
CONFIG_PACKAGE_liblua=y
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
index 33c4f53133..c4cf5f12a8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
@@ -266,6 +266,7 @@ static void __init rb951g_setup(void)
return;
ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 |
+ AR934X_ETH_CFG_RXD_DELAY |
AR934X_ETH_CFG_SW_ONLY_MODE);
#include <iostream>
#include <string>
using namespace std;
unsigned int hashLength32(string hash) {
return (hash.length() * 8 - 1) / 5 + 1;
}
// omitted: E O U T
#!/bin/sh
# First, open Advanced Networking app and set static 192.168.1.10/24 IP address
# to the Ethernet interface you're going to use below. To activate network boot,
# hold router's reset button for 5 seconds.
if [ -z "$2" ]; then
echo "Usage: $0 <if> <fw>"
exit 1
fi