See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
<?php | |
/* | |
Backup script for trakt.tv (API v2). | |
Live demo: https://darekkay.com/blog/trakt-tv-backup/ | |
*/ | |
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app | |
$apikey = "CLIENT_API_KEY"; |
// 'beforescriptexecute' event [es5] | |
// original version: https://gist.github.com/jspenguin2017/cd568a50128c71e515738413cd09a890 | |
;(function() { | |
;('use strict') | |
function Event(script, target) { | |
this.script = script | |
this.target = target | |
this._cancel = false |
version: '2' | |
services: | |
plex: | |
image: linuxserver/plex | |
container_name: plex | |
volumes: | |
- /path/to/plex/config:/config | |
- /path/to/plex/Movies:/data/movies | |
- /path/to/plex/Shows:/data/tvshows | |
- /path/to/plex/transcode:/data/transcode |
Update 2021-04-29: This may still work for you if you've got an old TP-Link router, but this is not maintained and doesn't work with newer models. If you've got a newer router, other projects like tpconf_bin_xml will likely work better for you.
TP-Link allows you to backup and restore your router's config file. For some reason, they decided to encrypt these backups so you cannot modify them. I think this is dumb. This script lets you decrypt and re-encrypt your config files so you can modify them as you see fit.
I use this to modify my reserved addresses list because editing them through the web interface is terribly slow and cumbersome.
ruby tp.rb config.bin
# riddle-of-100-prisoners | |
import numpy as np | |
import random | |
def algo(number): | |
midl = int((number / 2) - 1) | |
boxes = np.arange(number) | |
random.shuffle(boxes) |
#!/bin/bash | |
# Remove existing "nameserver" lines from /etc/resolv.conf | |
sed -i '/nameserver/d' /etc/resolv.conf | |
# Run the PowerShell command to generate "nameserver" lines and append to /etc/resolv.conf | |
# we use full path here to support boot command with root user | |
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '(Get-DnsClientServerAddress -AddressFamily IPv4).ServerAddresses | ForEach-Object { "nameserver $_" }' | tr -d '\r'| tee -a /etc/resolv.conf > /dev/null |
modules: | |
jellyfin: | |
headers: | |
# The Token value here needs to be an API key generated from the | |
# Jellyfin admin panel. It's hard-coded here but I'm sure there's | |
# a better way | |
Authorization: MediaBrowser Token=ADD_TOKEN_HERE | |
Content-Type: application/json | |
accept: application/json |