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 | |
set -eo pipefail | |
SCRIPT_PATH=$0 | |
MOUNT_DEV=/dev/mapper/fedora-root | |
MOUNT_PATH=/mnt | |
SNAPSHOTS_SUBVOL=.snapshots | |
SNAPSHOTS_PATH="$MOUNT_PATH/$SNAPSHOTS_SUBVOL" |
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
#cloud-config | |
users: | |
- default | |
- name: dnscrypt-proxy | |
gecos: DNSCrypt Proxy User | |
system: true | |
package_upgrade: true | |
packages: | |
- curl | |
- supervisor |
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
package main | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"io/fs" | |
"io/ioutil" | |
"log" | |
"os" |
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 Tokopedia Remove TopAds | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Remove those annoying TopAds from your search results! | |
// @author Izra Faturrahman <[email protected]> | |
// @match https://www.tokopedia.com/* | |
// @grant none | |
// @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 | |
if [ $# -lt 1 ]; then | |
echo >&2 "Usage: SetEnv.sh <android-arch> [min-sdk-version]" | |
return 1 | |
fi | |
if [ -z "$NDK" ]; then | |
echo >&2 "Missing 'NDK' environment variable" | |
return 1 |
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
/ip dhcp-client | |
add interface=ether2 add-default-route=no script="" | |
# The following is the script used to automatically add and remove the gateway from the DHCP client | |
:if ($bound = 1) do={ | |
/ip route add dst-address=8.8.8.8 gateway=$"gateway-address" scope=10 comment="ether2 gateway" | |
} else={ | |
/ip route remove [find comment="ether2 gateway"] | |
} |
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 | |
import csv | |
import sys | |
from typing import Iterable, List | |
def main(): | |
content_lines = sys.stdin.buffer.readlines() | |
reader = csv.reader(line.decode('utf-8') for line in content_lines) | |
headers = next(reader) |
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 sys | |
import cv2 | |
import numpy as np | |
from wand.color import Color | |
from wand.drawing import Drawing | |
from wand.image import Image | |
MAX_IMAGE_HEIGHT = 600 | |
COLORSCHEME_COUNT = 12 |
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/sh | |
timeout=30 | |
counter=0 | |
echo_error() { | |
echo $@ >&2 | |
} | |
password_fallback() { |
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/sh | |
timeout=30 | |
counter=0 | |
keyfile="$1" | |
echo_error() { | |
echo $@ >&2 | |
} |
NewerOlder