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 | |
# Source: https://www.digitalocean.com/community/tutorials/how-to-setup-dnssec-on-an-authoritative-bind-dns-server--2 | |
DOMAIN="$1" | |
PKIDIR="${PKIDIR:-/etc/bind/pki}" | |
ZONEDIR="${ZONEDIR:-/etc/bind/kizano}" | |
DOMAIN_KEY="" | |
# Set domain key in a config file under protected permissions. |
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 python3 | |
''' | |
Use case: I have an NFT for sale and I want to know when someone makes an offer on it. | |
I'm tired of refreshing the page at https://opensea.io/assets/ethereum/0x583f608324bce3569472d750b45ae5892d546a04/128 | |
so I can have a custom dashboard if I wish to know the fluctuations of the offers against this item I'm wathing until sold. | |
This script will suscribe to updates on OpenSea's API and will insert the offers into a MongoDB database. | |
In this way, I can track updates withouth having to refresh the page so intently and can build my own price graph. | |
Documentation: |
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
# Configuration file to replace `/etc/syslog-ng/syslog-ng.conf` | |
@version: 3.38 | |
@include "scl.conf" | |
# Syslog-ng configuration file, compatible with default Debian syslogd | |
# installation. | |
# First, set some global options. | |
options { | |
chain_hostnames(off); |
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 python3 | |
# -*- coding: utf-8 -*- | |
# Usage: I created a symlink to this file as ~/bin/es2en and ~/bin/en2es, but you can do this with any country code pairs. | |
# I put this in my `~/.fluxbox/keys` | |
# Mod4 Shift E :Exec /home/markizano/bin/es2en | |
# Mod4 Shift S :Exec /home/markizano/bin/en2es | |
# | |
# Restart fluxbox and now I can Win+Shift+E for English | |
# Win+Shift+S for Spanish |
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 | |
. common.sh | |
exec > >(log update-discord) | |
exec 2>&1 | |
function aptly() { | |
sudo -H -uaptly -gapps aptly $@ | |
} |
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
user nginx apps; | |
worker_processes 2; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
} | |
http { | |
#log_format extended "$http_host $remote_user@$remote_addr/$remote_port($proxy_add_x_forwarded_for, proxy=$http_proxy) $status($body_bytes_sent) \"$request\" \"$http_referer\" \"$http_user_agent\""; | |
log_format extended "JSON: {\"time\": \"$time_iso8601\", \"host\": \"$http_host\", \"user\": \"$remote_user\", \"remote\": \"$remote_addr:$remote_port\", \"proxy\": \"$proxy_add_x_forwarded_for\", \"status\": $status, \"response\": $body_bytes_sent, \"request\": \"$request\", \"upstream\": \"$upstream_addr\", \"t_req\": $request_time, \"t_upconn\": \"$upstream_connect_time\", \"t_upheaders\": \"$upstream_header_time\", \"t_upresponse\": \"$upstream_response_time\", \"referer\": \"$http_referer\", \"agent\": \"$http_user_agent\"}"; |
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 | |
# Tests out the generation of subtitles using a smiley emoji and the "sparkles" emoji. | |
# Note that some fonts like sans and sans-serif may have the smiley (0xf09f9884), but not the sparkles (0xe29ca8). | |
# Some fonts will have neither. | |
# I think support for emojis in FFMPEG/mpv/fonts could use some improvement. | |
exec 4>subs.srt | |
echo "1" >&4 | |
echo "00:00:00.000 --> 00:00:02.000" >&4 |
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 | |
# Teams shell you can add to ~teams/bin/teams and use `update-alternatives` to point to this instead. | |
# Be sure to add this to `/etc/sudoers.d/teams` | |
# %apps ALL=(msteams:apps) NOPASSWD: /usr/bin/teams | |
# | |
# I create a `teams` user using this: | |
# sudo addgroup --gid=200 apps | |
# sudo adduser --home=/home/apps/teams --shell=/usr/bin/teams --gid=200 --system msteams | |
# |
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
# Set NETFILE to the location containing the wpa_supplicant network configuration. | |
# Uncomment the line that is the active network. | |
export NETFILE=/etc/wifi/My-NET.wifi | |
#export NETFILE=/etc/wifi/Work-NET.wifi | |
#export NETFILE=/etc/wifi/Public.wifi |
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 | |
# This script not intended to run by itself, nor have exec permissions. | |
# This script intended only for sourcing from other scripts to reduce copy-paste code. | |
# Redirect STDOUT and STDERR to the system logger (syslog-ng). | |
function log () { | |
log_args='-i' | |
log_args="$log_args -u/dev/log" | |
log_args="$log_args -t $1" |
NewerOlder