Skip to content

Instantly share code, notes, and snippets.

😎
¯\_(ツ)_/¯

Viktor Petersson vpetersson

View GitHub Profile
@vpetersson
vpetersson / clean-pkg.sh
Last active Mar 29, 2019
Helper script for cleaning up pkg files
View clean-pkg.sh
#!/bin/bash
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# -*- sh-basic-offset: 4 -*-
set -euo pipefail
IFS=$'\n\t'
if [[ -z ${1} ]]; then
echo "Package name must be used as the argument."
@vpetersson
vpetersson / net-benchmark.md
Last active Mar 15, 2018
Raspberry Pi 3 Model B vs Raspberry Pi 3 Model B+ - network benchmark
View net-benchmark.md

Intro

  • Raspberry Pi Model B+: 192.168.202.28
  • Raspberry Pi Model B: 192.168.202.30

Raspberry Pi 3 Model B+

$ cat /sys/class/net/eth0/speed
1000
View screenly-ose-with-flick.py
#!/usr/bin/env python
import flicklib
import subprocess
from time import sleep
from copy import copy
@flicklib.move()
def move(x, y, z):
View cam1.yml
machinery:
image: kerberos/machinery
ports:
- "8889"
restart: always
volumes:
- /media/ext0/kerberosio/cam1/capture:/etc/opt/kerberosio/capture
- /media/ext0/kerberosio/cam1/logs:/etc/opt/kerberosio/logs
- /media/ext0/kerberosio/cam1/config:/etc/opt/kerberosio/config
View cam0.yml
machinery:
image: kerberos/machinery
ports:
- "8889"
restart: always
volumes:
- /media/ext0/kerberosio/cam0/capture:/etc/opt/kerberosio/capture
- /media/ext0/kerberosio/cam0/logs:/etc/opt/kerberosio/logs
- /media/ext0/kerberosio/cam0/config:/etc/opt/kerberosio/config
View screenly_sales_role_ad.md

We at Screenly are now looking to recruit our first consultant sales person. You will play a pivotal role in shaping the future of the company and structuring the sales organization.

Your responsibilities will include:

  • Find and qualify leads.
  • Manage our CRM.
  • Develop sales procedures.
  • Build relationships with new and existing customers.
  • Support various campaigns.
  • Work closely with our development and support team to provide feedback on the roadmap.
View gist:ff9b468240ab9b46f9be1ee79e4b749c
➜ upgrade kubectl get pods --namespace deis
NAME READY STATUS RESTARTS AGE
deis-builder-2199266375-rowzk 1/1 Running 1 51m
deis-controller-409370922-6sidv 1/1 Running 1 51m
deis-logger-9212198-kaxug 1/1 Running 4 51m
deis-logger-fluentd-7junn 1/1 Running 0 51m
deis-logger-fluentd-lxywg 1/1 Running 0 52m
deis-logger-redis-663064164-13kx9 1/1 Running 0 51m
deis-monitor-grafana-1178362579-eng6l 1/1 Running 0 51m
deis-monitor-influxdb-2729526471-6acfm 1/1 Running 0 51m
View spro-flash.md

Check the status of the SD card before we begin:

$ sudo fdisk -l /dev/sdc

Disk /dev/sdc: 7948 MB, 7948206080 bytes
240 heads, 32 sectors/track, 2021 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
View fetch_or_build.py
import time
import sys
import os
import dateutil.parser
from docker import Client
"""
Helper script to determine if you should rebuild the image or use the upstream image
using the modification timestamp of the Dockerfile.
View gist:6346d67c8466ed513c3adb716a054cdd
#!/bin/bash
set -e
RELEASEPATH="$HOME/Downloads/"
SD_DISK=$(mount | grep msdos | awk {'print $1'})
DISK_NO=$(echo $SD_DISK | awk '{print substr($0,length-2,1)}')
RDISK_BASE="/dev/rdisk"
RDISK=$RDISK_BASE$DISK_NO
You can’t perform that action at this time.