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
{
"name": "Nosana NFT Credit",
"symbol": "NOS-COIN",
"description": "Nosana NFT Credit for minting official Nosana NFTs",
"seller_fee_basis_points": 800,
"image": "https://nosana.io/img/NOS_logo.png",
"animation_url": "https://qw2aypdpczdfkn53wdblartsdydb5jkycvvnuivyyca7j5n4.arweave.net/hbQMPG8WRl-U3u7DCsEZyHgYepVgVat_oiuMCB9PW8M?ext=gif",
"external_url": "nft.nosana.io",
"edition": 1,
"attributes": [
function update
vim +PlugUpdate +PlugUpgrade +qall
fisher
fish_update_completions
switch (uname)
case Linux
sudo apt-get -y update # Fetches the list of available updates
sudo apt-get -y upgrade # Strictly upgrades the current packages
sudo apt-get -y dist-upgrade # Installs updates (new ones) case Darwin
sudo apt-get -y autoremove
@sjoerd-dijkstra
sjoerd-dijkstra / export.fish
Last active April 3, 2020 11:41
Bash-like `export` method that handles lists, and additionally uses iTerms' SetUserVar
function export --description 'Set env variable. Alias for `set -gx` for bash compatibility.'
if not set -q argv[1]
set -x
return 0
end
for arg in $argv
set -l v (string split -m 1 "=" -- $arg)
switch (count $v)
case 1
@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
@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')
#!/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

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:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~.
: .~.'~'.~. :
~ ( ) ( ) ~
( : '~'.~.'~' : )
~ .~ ( ) ~. ~
#!/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