Skip to content

Instantly share code, notes, and snippets.

@zorun
zorun / lscpu-apple-m1.json
Created June 29, 2022 22:19
lscpu on Apple M1 running Linux (gcc103, compile farm)
{
"lscpu": [
{
"field": "Architecture:",
"data": "aarch64",
"children": [
{
"field": "CPU op-mode(s):",
"data": "64-bit"
},{
@zorun
zorun / 99-wifi.sh
Created November 11, 2019 19:54
uci-defaults script for OpenWrt that configures Wi-Fi
#!/bin/sh
WIFI_PASSWORD_FILE="/lib/rezine/wifi"
# If no password is provided in the image, exit and remove this script
wifi_password="$(cat $WIFI_PASSWORD_FILE)" || exit 0
for radio in 'radio0' 'radio1'
do
# Radio doesn't exist.
$ ./mikrotik_radio_data.py hap-ac2/mtd3_hard_config.bin
c_uint(13768)
$ ./atheepmgr -t 9300 -F radio.bin
.----------------------.
| EEPROM Base Header |
'----------------------'
Version : 76
@zorun
zorun / gist:c2c2cc2c7d47bab780915ed425eb164c
Last active April 18, 2018 13:55
Coq 8.8.0 doc build error
(cd doc/tutorial; hevea -fix -exec xxdate.exe Tutorial.v)
(cd doc/tutorial;\
latex -interaction=batchmode Tutorial.v;\
../tools/show_latex_messages Tutorial.v.log)
(cd doc/tutorial;\
pdflatex -interaction=batchmode Tutorial.v.tex;\
../tools/show_latex_messages Tutorial.v.log)
../common/macros.tex:215: Warning: Defining '\proof' by \renewcommand
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Arch Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
@zorun
zorun / python-packaging.patch
Created May 31, 2016 14:51
Python packaging suggestion
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index cd17547..22bf4a0 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -8,4 +8,4 @@ add_custom_target(python ALL
COMMAND python3 setup.py build
DEPENDS opendht opendht_cpp.pxd opendht.pyx)
-install(CODE "execute_process(COMMAND python3 setup.py install WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
+install(CODE "execute_process(COMMAND python3 setup.py install --root=$ENV{DESTDIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")