Skip to content

Instantly share code, notes, and snippets.

View paraita's full-sized avatar
🏠
Working from home

Paraita Wohler paraita

🏠
Working from home
View GitHub Profile
@paraita
paraita / config.json
Created March 1, 2021 05:23
Working config (mind the REDACTED bridge data) everywhere (Mac/iPad/iPhone) but frame rate is meh
{
"bridge": {
"name": "Homebridge REDACTED",
"username": "11:11:11:11:11:11",
"port": REDACTED,
"pin": "111-22-333"
},
"accessories": [],
"platforms": [
{
@paraita
paraita / config.json
Created March 1, 2021 05:21
Working config (mind the redacted bridge data) on Mac/iPad but not on iPhone. Super fluid !
{
"bridge": {
"name": "Homebridge REDACTED",
"username": "00:00:00:00:00:00",
"port": REDACTED,
"pin": "000-11-333"
},
"accessories": [],
"platforms": [
{
@paraita
paraita / docker-compose.yaml
Created September 4, 2020 18:33
Kuzzle docker-compose with dashboard (you need to compile it and put it in the data folder so nginx can serve it)
version: '3'
services:
kuzzle:
image: kuzzleio/kuzzle:2
ports:
- "7512:7512"
- "1883:1883"
cap_add:
- SYS_PTRACE
@paraita
paraita / speedtest-monitorer.py
Last active July 29, 2020 01:16
Poll speedtest and push the result to an InfluxDB server
#! /usr/bin/env python3
from speedtest import Speedtest
from influxdb import InfluxDBClient
servers = {
"ONATI": 31118,
"Cox": 16615
}
DB_URL="monitoring.somewhere.com"
@paraita
paraita / extended-cleanup-rancher2.sh
Created January 31, 2020 03:05 — forked from superseb/extended-cleanup-rancher2.sh
Extended Rancher 2 cleanup (backup your data, use at your own risk)
#!/bin/sh
# Backup your data
# Use at your own risk
# Usage ./extended-cleanup-rancher2.sh
# Include clearing all iptables: ./extended-cleanup-rancher2.sh flush
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico"
@paraita
paraita / user-script.sh
Created September 3, 2018 14:44
Host in AE + SS in Az (8.2.0)
#!/bin/bash
set -x
set -e
set -o pipefail
umask 0022
JSONCONFIG=`base64 -d /var/lib/waagent/CustomData`
echo $JSONCONFIG
@paraita
paraita / internal-script.sh
Last active September 3, 2018 14:12
Host in AE + SS in Az (8.2.0)
#!/bin/bash
set -x
SSH_USERNAME="paraita"
SSH_PORT=22222
function debug {
DEBUGCONTENT=`echo $1 | base64 -w 0`
DEBUGMESSAGE="<QueueMessage><MessageText>$DEBUGCONTENT</MessageText></QueueMessage>"
curl -X POST -d "$DEBUGMESSAGE" "https://$STORAGEACCOUNT.queue.core.windows.net/debug/messages?$SASKEY"
@paraita
paraita / README.md
Last active April 3, 2020 01:39 — forked from leosuncin/README.md
Install Powerline on Debian/Ubuntu
  1. Install pip sudo apt-get install python-pip or wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
  2. Install powerline sudo pip install powerline-status
  3. Download and install fonts git clone https://github.com/powerline/fonts.git && cd fonts && sh ./install.sh
  4. Add this lines to respective file
    .vimrc

set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
> " Always show statusline

@paraita
paraita / azure-bench-deployment-8-2-0-script.sh
Last active July 12, 2018 12:19
Azure bench deployment script for the 600 nodes on Azure with 8.2.0
#!/bin/bash
set -x
SSH_USERNAME="hpcpeps"
SSH_PORT=22
function debug {
DEBUGCONTENT=`echo $1 | base64 -w 0`
DEBUGMESSAGE="<QueueMessage><MessageText>$DEBUGCONTENT</MessageText></QueueMessage>"
curl -X POST -d "$DEBUGMESSAGE" "https://$STORAGEACCOUNT.queue.core.windows.net/debug/messages?$SASKEY"
#!/bin/bash
# This script is used as internalCustomStartupScript to setup the VM of the Azure Scale Set.
# This setup is for Centos 7.2 VM only, and involves:
# - setting up Docker and Docker-Compose
# - setting up ProActive Node service with PNP
# - starting the ProActive Node service
set -x