Skip to content

Instantly share code, notes, and snippets.

@vk496
vk496 / package.json
Last active January 10, 2023 22:13
Trading212 portable buyer
{
"name": "t212buy",
"version": "1.0.0",
"description": "",
"main": "t212buy.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "@vk496",
"license": "GPLv3",
@vk496
vk496 / archivenc.sh
Created October 15, 2020 12:17
Script to compress NetCDF files
#!/bin/env bash
# Author: Valentin Kivachuk Burda
DEPENDS=(nccopy awk wc grep find)
#https://stackoverflow.com/a/12436838/2757192
function max_bg_procs {
if [[ $# -eq 0 ]] ; then
@vk496
vk496 / gist:c006c9a1c615c03c9a0079a6a25d0ecf
Created October 24, 2018 20:56
$ iw --debug dev wlp2s0 station dump 2>&1
-- Debug: Sent Message:
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 28
.type = 28 <0x1c>
.flags = 773 <REQUEST,ACK,ROOT,MATCH>
.seq = 1540414428
.port = -1237292432
[GENERIC NETLINK HEADER] 4 octets
.cmd = 17
@vk496
vk496 / 00_OEM_bootlog
Last active October 11, 2018 09:43
Strong 1200 logs
===================================================================
MT7621 stage1 code Mar 12 2015 14:43:30 (ASIC)
CPU=500000000 HZ BUS=166666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x31100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-800Mhz ===
PLL2 FB_DL: 0xa, 1/0 = 615/409 29000000
@vk496
vk496 / PKGBUILD
Created February 12, 2018 10:11
Autofirma 1.6
# Maintainer: Miguel Revilla <yo at miguelrevilla dot com>
pkgname=autofirma
pkgver=1.6
pkgrel=1
pkgdesc='Spanish Government digital signature client'
arch=('i686' 'x86_64')
url='http://firmaelectronica.gob.es'
license=('GPL' 'EUPL')
depends=('java-runtime=8' 'nss' 'firefox')
cat tgl/scheme.tl tgl/encrypted_scheme.tl tgl/binlog.tl tgl/append.tl tgl/mtproto.tl > auto/scheme.tl
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl/tl-parser -c -MP -MD -MF dep/tl-parser.d -MQ objs/tl-parser.o -o objs/tl-parser.o tgl/tl-parser/tl-parser.c
gcc -I. -I. -I./tgl -g -O2 -I/usr/local/include -I/usr/include -I/usr/include -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl/tl-parser -c -MP -MD -MF dep/tlc.d -MQ objs/tlc.o -o objs/tlc.o tgl/tl-parser/tlc.c
gcc objs/tl-parser.o objs/tlc.o -L/usr/local/lib -L/usr/lib -L/usr/lib -rdynamic -ggdb -levent -ljansson -lconfig -lz -levent -lreadline -llua5.3 -lm -ldl -lssl -lcrypto -ldl -lpth
### Keybase proof
I hereby claim:
* I am vk496 on github.
* I am vk496 (https://keybase.io/vk496) on keybase.
* I have a public key ASBW2AjvabmTrwvvs1oDyqvxx85J2ZtnHQvaer2XV3zJGwo
To claim this, I am signing this object:
function print_r ( t )
local print_r_cache={}
local function sub_print_r(t,indent)
if (print_r_cache[tostring(t)]) then
print(indent.."*"..tostring(t))
else
print_r_cache[tostring(t)]=true
if (type(t)=="table") then
for pos,val in pairs(t) do
if (type(val)=="table") then