Skip to content

Instantly share code, notes, and snippets.

@drakulaboy
drakulaboy / move.ps1
Created August 15, 2023 14:00
Move files that have cyrilic letters in test2 folder
$source = "E:\Muzon\CAR Music\rus"
$destination = Join-Path -Path $source -ChildPath "test2"
$filter = "*.*" # Change this to match the desired file extensions
$filesWithCyrillic = Get-ChildItem -Path $source -File | Where-Object { $_.Name -match "\p{IsCyrillic}" -and $_.Name -like $filter }
# Create the destination directory if it doesn't exist
if (-not (Test-Path -Path $destination)) {
New-Item -Path $destination -ItemType Directory
}
@drakulaboy
drakulaboy / vert-center-glyphs.py
Created April 12, 2023 11:24 — forked from nathanielevan/vert-center-glyphs.py
Python script to vertically center glyphs in a font
# Python script to vertically center a set of glyphs in a font.
# Requires fontforge python module.
# Credits to u/janKeTami here: https://www.reddit.com/r/FontForge/comments/11r6x4q/vertically_centering_glyphs/
# Slightly altered to enable this script to be run straight from the terminal using ttf/otf fonts
import re
import os
import argparse
try:
import psMat
@drakulaboy
drakulaboy / gist:295eb18f934e028b9f55fff38c82321d
Created December 21, 2021 18:27 — forked from romanbb/gist:8011102
compile, push, and start SystemUI.apk
#!/bin/bash
. build/envsetup.sh
mmm frameworks/base/packages/SystemUI/
adb start-server
adb shell pkill -TERM -f com.android.systemui
adb remount
adb push $OUT/system/priv-app/SystemUI.apk /system/priv-app/SystemUI.apk
adb shell pkill -TERM -f com.android.systemui
adb shell chmod 0644 /system/app-priv/SystemUI.apk
sleep 2
@drakulaboy
drakulaboy / wait-el.js
Created April 9, 2017 17:58 — forked from chrisjhoughton/wait-el.js
Wait for an element to exist on the page with jQuery
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};
;(function ($, window) {
var intervals = {};
var removeListener = function(selector) {
if (intervals[selector]) {
window.clearInterval(intervals[selector]);
intervals[selector] = null;
}