Skip to content

Instantly share code, notes, and snippets.

View sjoerd-dijkstra's full-sized avatar
:octocat:
Coding

Sjoerd sjoerd-dijkstra

:octocat:
Coding
View GitHub Profile
#!/usr/bin/env bash
source "$(pwd)/../../functions.sh"
symlink_dotfiles ".gitcredentials .bitbucket .gist"
# VARIABLES
export OUTPUT=/media/DATA/sjoerd/demo/$argv
export MOVIE_FILE=$OUTPUT/Video/movie.mp4
export DATA_DIR=$OUTPUT/Frames/clipped/
export LANDMARK_DIR=$OUTPUT/Landmarks/clm/
export IDENTITY_PATH=/home/sjoerd/Identities/DEMO/
export START_NUMBER=0
export IDENTITY_FRAMES="25,50,75"
export KEYFRAMES_DIR=$OUTPUT/Keyframes/
## Address to get all EFX tokens XD
byte_array = b'\xfd\x95F\xc1\x0eh\xaa?\xc1,\x0f\xcd\x07\xf4\xb7\xe3\x19\xb1\xd9\xd6'
int_list = list(byte_array)
print ("Length of byte array is {}".format(len(int_list)))
print ("{")
for int_byte in int_list:
print ("(byte) {},".format(int_byte))
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~.
: .~.'~'.~. :
~ ( ) ( ) ~
( : '~'.~.'~' : )
~ .~ ( ) ~. ~
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am sjoerd-dijkstra on github.
  • I am sdijkstra (https://keybase.io/sdijkstra) on keybase.
  • I have a public key ASApkgyR-0Pg6edOMeRgQ3JI2ccBL1fb1WvjEJ1DrAPaPwo

To claim this, I am signing this object:

#!/bin/bash
TARGET=/home/pi/websites
GIT_DIR=/home/pi/websites.git/
BRANCH=master
while read oldrev newrev ref
do
# only checking out the master (or whatever branch you would like to deploy)
if [ "$ref" = "refs/heads/$BRANCH" ];
then
@sjoerd-dijkstra
sjoerd-dijkstra / gitlab_clone.py
Last active August 22, 2019 07:34
Script to automatically clone gitlab projects. It will create a folder structure in --dir similar to the group tree in gitlab.
import argparse
import gitlab
import os
import subprocess
import getpass
# parse args
parser = argparse.ArgumentParser(description='Gitlab Clone Tree 🌲')
parser.add_argument('-U', '--url', required=False, default='https://gitlab.com/', help='gitlab url')
parser.add_argument('-P', '--prefix', required=True, help='ssh gitlab prefix')
@sjoerd-dijkstra
sjoerd-dijkstra / nzbget.service
Last active March 25, 2020 21:01
NAS Services
[Unit]
Description=NZBGet Daemon
After=network.target
[Service]
Type=forking
User=%i
ExecStart=/opt/nzbget/nzbget -c /opt/nzbget/nzbget.conf -D
ExecStop=/opt/nzbget/nzbget -Q
ExecReload=/opt/nzbget/nzbget -O