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
# Ludwig's special pickaxe | |
# | |
# Inspired by: | |
# https://forums.skunity.com/threads/3x3-mining.4864/#post-18936 | |
# | |
# Install https://github.com/SkriptLang/Skript/releases | |
# Place this file in plugins/Skript/scripts | |
# | |
# Usage: | |
# /lp user <user> permission set lpickaxe.use true |
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 bash | |
main() { | |
local first=$1 | |
local last=$2 | |
local pids=() | |
[[ -z "${first}" || -z "${last}" ]] && { >&2 echo "listen.sh <first> <last>"; return 1; } | |
for (( port=first; port <= last; port++ )); do |
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
# After gathering all the evidence: | |
grep -f <(grep -f <(awk '/^License Plate L337.*9$/,/^$/' vehicles | sed '/^$/d' | paste -d, - - - - - - | awk '/Honda/ && /Blue/ && /Height: 6/' | awk -F, '{print $4}' | awk -F': ' '{print $NF}') memberships/{AAA,Delta_SkyMiles,Museum_of_Bash_History,Terminal_City_Library} | awk -F: '{print $NF}' | sort | uniq -c | awk '/ 4 / {print $2" "$3}') people | awk '{gsub(/,/, "", $6); print "nl streets/"$5"_"$6" | grep "$NF}' | bash | awk -F# '{print "grep -nH \"Considered a suspect\" interviews/interview-"$NF}' | bash | awk -F'[-:]' '{print "grep -n \"SEE INTERVIEW #"$2"\" streets/*"}' | bash | awk -F'[/:]' '{gsub(/_/, " ", $2); print "grep -E \""$2".*line "$3"\" people"}' | bash | awk '{print $1" "$2}' | $(command -v md5 || command -v md5sum) | grep -qif /dev/stdin ../encoded && echo CORRECT\! GREAT WORK, GUMSHOE. || echo SORRY, TRY AGAIN. |
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 { Easing, PluginServiceGlobalRegistration, PluginServiceRegistrationOptions } from 'chart.js'; | |
export class BackgroundPlugin implements PluginServiceGlobalRegistration, PluginServiceRegistrationOptions { | |
id = 'background-plugin'; | |
beforeDraw(chartInstance: Chart, easing: Easing, options?: any): void { | |
const chartOptions = chartInstance.options as any; | |
if (!('backgroundPlugin' in chartOptions) || !('backgroundColors' in chartOptions.backgroundPlugin)) { | |
return; | |
} |
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
↳ cat curl-format.txt | |
{\n | |
"time_namelookup": %{time_namelookup},\n | |
"time_connect": %{time_connect},\n | |
"time_appconnect": %{time_appconnect},\n | |
"time_pretransfer": %{time_pretransfer},\n | |
"time_redirect": %{time_redirect},\n | |
"time_starttransfer": %{time_starttransfer},\n | |
"time_total": %{time_total}\n | |
}\n |
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
[[snippets]] | |
description = "Get my external IP address." | |
command = "curl ifconfig.co" |
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 bash | |
wifi_interface="$(nmcli d | awk '$2 ~ /wifi/ {print $1}')" | |
description="${1:-${wifi_interface}}" | |
sudo true | |
samples=10 | |
sequences=($(seq 1 ${samples})) |
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
startup_message off | |
escape ^Ss | |
termcapinfo rxvt-unicode ti@:te@ #enable SHIFT-PGUP / SHIFT-PGDOWN scroll | |
terminfo rxvt-unicode ti@:te@: | |
term screen-256color | |
setenv LC_CTYPE en_US.UTF-8 | |
defutf8 on | |
nonblock on | |
vbell off | |
msgwait 10 |
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
if [[ "${TERM}" == screen* ]]; then | |
preexec() { :; } | |
screen_window_title() { | |
[[ -n "${COMP_LINE}" ]] && return | |
[[ "${BASH_COMMAND}" == "${PROMPT_COMMAND}" ]] && return | |
local cmd=$(HISTTIMEFORMAT= history 1 | sed -e "s/^[ ]*[0-9]*[ ]*//") | |
local title="${cmd}" | |
(( "${#title}" > 12 )) && title="${title:0:12}..." | |
printf '\ek%s\e\\' "${title}" |
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
test_unicode() { | |
echo -ne "\xe2\x88\xb4\033[6n\033[1K\r" | |
# shellcheck disable=SC2034 | |
read -d R foo | |
echo -ne "\033[1K\r" | |
echo -e "${foo}" | cut -d \[ -f 2 | cut -d";" -f 2 | ( | |
read UNICODE | |
[[ $UNICODE -eq 2 ]] | |
) 2>/dev/null | |
} |
NewerOlder