Skip to content

Instantly share code, notes, and snippets.

@skrobul
skrobul / convert.py
Created April 5, 2022 09:05
convert google timeline location history into owntracks
#!/usr/bin/env python
import json
from datetime import datetime
print("Parsing input data...")
records = json.load(open("./Takeout/Location History/Records.json"))['locations']
print("Done.")
def convert_conn(record):
@skrobul
skrobul / devel.txt
Last active October 17, 2022 16:07
❯ kubectl -n kadalu get pods
NAME READY STATUS RESTARTS AGE
kadalu-csi-nodeplugin-vx5qk 0/3 ContainerCreating 0 2m55s
operator-6c7c7b5797-zjl2p 0/1 CrashLoopBackOff 4 (80s ago) 2m55s
~
❯ kubectl -n kadalu logs operator-6c7c7b5797-zjl2p
exec /kadalu/bin/python3: exec format error
~
@skrobul
skrobul / Dockerfile
Last active November 22, 2021 09:11
eufy-security-ws node 16 build
FROM node:16-alpine as build
WORKDIR /tmp
COPY . .
RUN npm ci && npm run build
FROM node:16-alpine
WORKDIR /usr/src/app
COPY --from=build /tmp/dist ./dist
COPY --from=build /tmp/docker/run.sh ./run.sh
COPY --from=build /tmp/package.json ./package.json
@skrobul
skrobul / kube-scheduler.txt
Created June 28, 2020 16:07
kube-scheduler.txt
vagrant@master-1:~$ sudo journalctl -u kube-scheduler --since=-10m
-- Logs begin at Thu 2020-06-25 17:21:59 UTC, end at Mon 2182-11-11 20:15:42 UTC. --
Jun 28 16:00:34 master-1 systemd[1]: Started Kubernetes Scheduler.
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.309830 835 flags.go:33] FLAG: --add-dir-header="false"
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.310257 835 flags.go:33] FLAG: --address="127.0.0.1"
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.310271 835 flags.go:33] FLAG: --algorithm-provider=""
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.310275 835 flags.go:33] FLAG: --alsologtostderr="false"
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.310278 835 flags.go:33] FLAG: --authentication-kubeconfig=""
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.310281 835 flags.go:33] FLAG: --authentication-skip-lookup="false"
Jun 28 16:00:35 master-1 kube-scheduler[835]: I0628 16:00:35.310287
@skrobul
skrobul / gist:2803c08fc77ea639d022
Last active July 14, 2018 20:18
HSBC UK Individual - Human friendly account names
// ==UserScript==
// @name HSBC Personal - Human friendly account names
// @namespace http://github.com/skrobul
// @version 0.2
// @description This scripts adds user-friendly names for your HSBC accounts. It can help with managing multiple accounts.
// @author skrobul <skrobul@skrobul.com>
// @match https://www.services.online-banking.hsbc.co.uk/*
// @grant none
// ==/UserScript==
@skrobul
skrobul / # weechat - 2016-04-25_13-51-39.txt
Created April 25, 2016 12:54
weechat on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for weechat on Mac OS X 10.10.5
Build date: 2016-04-25 13:51:39
$ ruby ./getmac.rb 10.9.30.138
Scanning VLAN: 1
[T] Start: 2013-10-28 17:49:29 +0000
[T] Got bportids_to_mac_table in 0.039541 seconds
[T] Got macidx_to_brport 0.045924 seconds
[T] Got bridgeport to ifindex mapping 0.048247 seconds
[T] Got ifIndex to ifName mapping 0.270035 seconds
Total time spent on this vlan: 0.403856 seconds
Scanning VLAN: 2
[T] Start: 2013-10-28 17:49:29 +0000
@skrobul
skrobul / gist:6887355
Created October 8, 2013 16:25
vpnc-script that makes OpenConnect on MACOSX possible
#!/bin/sh
#
# Originally part of vpnc source code:
# © 2005-2012 Maurice Massar, Jörg Mayer, Antonio Borneo et al.
# © 2009-2012 David Woodhouse <dwmw2@infradead.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
root@c208540c41e2:/var/lib/nagios3# ls -ld /var /var/lib /var/lib/nagios3 /var/lib/nagios3/rw
drwxr-xr-x 64 root root 4096 Sep 19 15:48 /var
drwxr-xr-x 45 root root 4096 Sep 19 15:48 /var/lib
drwxrwxr-x 21 nagios nagios 4096 Sep 30 15:24 /var/lib/nagios3
drwxrwx--- 2 nagios nagios 4096 Sep 30 16:24 /var/lib/nagios3/rw
root@c208540c41e2:/var/lib/nagios3# su - www-data -c "/bin/bash"
bash: no job control in this shell
www-data@c208540c41e2:~$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data),104(nagios),1000(nagcmd)
@skrobul
skrobul / gist:97a992491a3efca6f09d
Created November 9, 2015 11:00
salt uncomment
$ cat /tmp/myfile
# blah
#acl_smtp_predata = daily_limit_acl
#acl_not_smtp = daily_limit_acl
more blah
$ salt-call --local file.uncomment /tmp/myfile 'acl_(smtp_predata|not_smtp) = daily_limit_acl'
local:
---
+++