** Scripts tested in Firefox only!
Log in into your account. Go to https://www.youtube.com/feed/channels and scroll down to load all subscriptions
function download(filename, text) {
var element = document.createElement('a');| ################################################################################ | |
| # docker-compose file to run yobasystems/alpine-mariadb & phpmyadmin/phpmyadmin | |
| # | |
| # run with `docker-compose up -d` | |
| # and connect on host using mysql command: `mysql -h127.0.0.1 -uroot -ppassword` | |
| # or over phpMyAdmin http://localhost:8080/ | |
| # | |
| # Author Andrew Guk | |
| ################################################################################ |
| #!/bin/sh | |
| # Shows list of files and last change in git for them | |
| # USAGE: | |
| # ~/gw.sh [optional: <file1> <file2> ... otherwise current dir will be used] | |
| # complex example | |
| # bash -c "~/gw.sh $(git ls-tree -r --name-only HEAD app/*/web/main.js | tr '\n' ' ')" | |
| # | |
| # based on: https://stackoverflow.com/a/17361406 |
| #!/bin/sh | |
| # first grep is all nested plugins, second is for plugins without directory (php file only plugins) | |
| grep -rw -P "(^Version|\sVersion):" wp-content/plugins/*/*.php && | |
| grep -w -P "(^Version|\sVersion):" wp-content/plugins/*.php | |
| #!/bin/sh | |
| # USAGE: | |
| # ~/gw.sh [optional: <file1> <file2> ... otherwise current dir will be used] | |
| # complex example | |
| # bash -c "~/gw.sh $(git ls-tree -r --name-only HEAD app/*/web/main.js | tr '\n' ' ')" | |
| # | |
| # SAMPLE OUTPUT: | |
| # ~/gw.sh | |
| # Running on current dir |
| const spawn = require('child_process').spawn | |
| const proc = spawn( | |
| 'pgrep', | |
| [ | |
| '-f', | |
| 'sh', | |
| ] | |
| ) |
| #!/bin/zsh | |
| # Script to install fuse-ext2 on M1 Mac | |
| # Install dependencies | |
| #brew install e2fsprogs m4 automake autoconf libtool pkg-config | |
| cd ~/ | |
| if [ ! -d ~/fuse-ext2 ]; then | |
| git clone https://github.com/alperakcan/fuse-ext2.git |
** Scripts tested in Firefox only!
Log in into your account. Go to https://www.youtube.com/feed/channels and scroll down to load all subscriptions
function download(filename, text) {
var element = document.createElement('a');This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.
| #!/bin/sh | |
| # Script to create databases according to dump filenames if not yet imported | |
| # put `dump.sql` files here near script | |
| # Author: Andrew Guk | |
| for file in /db-dumps/*.sql | |
| do | |
| filename=$(basename $file) | |
| dbname="${filename%%.*}" |
| # Custom Shuffle Function in Ruby (Without Using shuffle) | |
| # Description: | |
| # This function takes an integer `n` as input and returns an array of numbers from 1 to `n` | |
| # in a randomized order using the analog of Fisher-Yates algorithm (that runs forward, not backward as Fisher-Yates algorithm). | |
| # The implementation avoids using Ruby's built-in `shuffle` method, ensuring a custom | |
| # randomization approach that produces different sequences with no recognizable pattern. | |
| def random_shuffle(n) | |
| arr = (1..n).to_a |