Skip to content

Instantly share code, notes, and snippets.

Avatar

Yana Timoshenko alpakido

View GitHub Profile
View example.cue
FILE "example.bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
View choir.erl
-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.
View reject-poison-keys.diff
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 [
View hq9+.rb
@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,
@alpakido
alpakido / cljack-in
Last active Feb 1, 2019
Project-independent nREPL setup for Clojure CLI
View cljack-in
#!/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"])'
View divinity-original-sin-2.sh
#!/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
@alpakido
alpakido / config.seed
Last active Apr 11, 2019
OpenWrt .config for Zyxel Keenetic (w/ LuCI)
View config.seed
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
View rb951g-2hnd.diff
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);
View nix-base32.cpp
#include <iostream>
#include <string>
using namespace std;
unsigned int hashLength32(string hash) {
return (hash.length() * 8 - 1) / 5 + 1;
}
// omitted: E O U T
View flash-mikrotik
#!/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