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
#!/system/bin/sh | |
PKGS=( | |
com.sec.android.soagent | |
com.wssyncmldm | |
com.samsung.sdm | |
) | |
MODE="$1" | |
for pkg in "${PKGS[@]}"; | |
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
#!/usr/bin/env bash | |
# Ignore SIGINT. | |
trap '' SIGINT | |
# Given a file name, get the audio codec. | |
get_codec_name() { | |
ffprobe "$1" \ | |
-v quiet \ | |
-show_streams \ |
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 | |
trap 'echo Ignoring' INT | |
filename="$(basename -- "$1")" | |
ext="${filename##*.}" | |
filenameNoExt="${filename%.*}" | |
dir="$(dirname "$1")" | |
new="$dir/degraded_$filenameNoExt.$ext" |
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 | |
trap 'echo Ignoring' INT | |
get_codec_name() { | |
ffprobe "$1" \ | |
-v quiet \ | |
-show_streams \ | |
-select_streams a \ | |
-show_entries stream=codec_name \ |
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 | |
shopt -s globstar | |
FROM="opus" | |
TO="mp3" | |
OUT_DIR="Converted" | |
for file in **/*."$FROM" | |
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
import 'dart:async'; | |
import 'package:path/path.dart'; | |
import 'package:sqflite/sqflite.dart'; | |
/// A very simple class that we recognize as SQLite-compatible | |
abstract class DatabaseModel { | |
Map<String, Object?> toMap(); | |
} |
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
class Solution: | |
def mincostTickets(self, days: List[int], costs: List[int]) -> int: | |
# S[i] = min total cost to travel for up to i days | |
# S[i] = | |
# min(S[i-1] + costs[0], S[i-7] + costs[1], S[i-30] + costs[2]) if i is in days | |
# S[i-1] otherwise | |
# answer is S[-1] | |
# so either it is cheaper to check the price 7 days ago with the cost of a 7 day | |
# pass, or our pass is still in service, so the price does not change |
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
By using Bedrock, you are aggreeing to these terms. | |
Bedrock requests your 1) Google Account email, 2) Google public profile information, and 3) permission to modify Bedrock's own app data in Google Drive. No information is sent anywhere except for Google's own official APIs and the Bedrock app itself. | |
Bedrock requests read and write access to your "minecraftWorlds" folder on your device's internal storage. Bedrock uploads and downloads files and folders from this directory (and this directory only) to Google Drive exclusively. |
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 | |
xinput test-xi2 --root 3 | \ | |
gawk '/RawKeyRelease/ {getline; getline; print $2; fflush()}' | \ | |
while read -r key | |
do | |
[[ "$key" -ne 34 && "$key" -ne 35 ]] && continue | |
VOL="+15%" | |
[[ "$key" -eq 34 ]] && VOL="-15%" |
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
#!/system/bin/sh | |
LOCAL=false | |
PORT=65432 | |
usage() { | |
echo "Usage: $0 [-h] [-l] [-k] [-p PORT] | |
-h Show this screen | |
-l Only allow localhost connections | |
-k Kill any open netcat sessions |
NewerOlder