This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# | |
# Check if array is empty | |
# | |
typeset -A knock_sequences | |
if [ ${#knock_sequences[@]} -eq 0 ]; then | |
echo "No knock sequence found." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://zaiste.net/zsh_get_filename_extension_path/#!/bin/zsh | |
# Filename | |
fullpath="/etc/nginx/nginx.conf" | |
filename=$fullpath:t | |
echo $filename | |
# result: nginx.conf | |
# Path | |
fullpath="/etc/nginx/nginx.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Key Mappings": { | |
"0x2a-0x200000": { | |
"Action": 12, | |
"Text": "*" | |
}, | |
"0x2b-0x200000": { | |
"Action": 12, | |
"Text": "+" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Facebook's external link tracking (updated for the new FB) | |
// @description Removes redirection and "FB click identifier" from external FB links | |
// @namespace https://gist.github.com/k-barton | |
// @include https://*.facebook.com* | |
// @include http://*.facebook.com* | |
// @version 0.3.2 | |
// @grant unsafeWindow | |
// @run-at document-start | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: dns-sync | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY; | |
import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME; | |
import static jsinterop.annotations.JsPackage.GLOBAL; | |
import com.fasterxml.jackson.annotation.JsonIgnore; | |
import com.fasterxml.jackson.annotation.JsonSubTypes; | |
import com.fasterxml.jackson.annotation.JsonTypeInfo; | |
import com.fasterxml.jackson.annotation.JsonTypeName; | |
import javax.annotation.Nullable; | |
import jsinterop.annotations.JsOverlay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |