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
// This script automates clicking Google Scholar cancel alert and confirm buttons, designed for use in the Chrome developer console. It addresses situations where the page reloads after each click, requiring manual re-execution of the script. Here's how it works: | |
try{ | |
const cancelButtons = document.querySelectorAll('.gs_btn_flat') | |
cancelButtons[0].click(); | |
} catch (error) {} | |
document.querySelector('[name="cancel_alert_btn"]').click(); |
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 | |
# Tested on MacOS | |
# @license: APACHE 2.0 | |
# @author: Zlatko K. Minev (2020) | |
############################################################### | |
### User define! | |
alias lyx="/Applications/LyX.app/Contents/MacOS/lyx" # # https://wiki.lyx.org/LyX/ManPage |
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
#!python | |
""" | |
Break out tables from a tex or latex file into separate tables .tex files.. | |
To see help | |
>> python latex_replace_text_by_input_file.py -h | |
To run user either of: | |
>> python latex_replace_text_by_input_file.py -f epr-main | |
>> python latex_replace_text_by_input_file.py -f epr-main -d _SUBMIT_ |
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
# Zlatko Minev 2020 | |
# Batch add users from a list to a repository on GitHub.com using their RestV3 API | |
# from file `names.txt` each new line has a new user id or url | |
# Also log result to screen and file. | |
# To test your connection first, try to get user info: | |
# curl -i -u "${GH_USER}:${PASSWORD}" "https://api.github.com/users/zlatko-minev" | |
# and see if you get a valid response. | |
GH_USER="my-user-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
#!/bin/bash | |
# Pretty much script from | |
# https://hisham.hm/2019/02/12/splitting-a-git-commit-into-one-commit-per-file/ | |
# but modified to work with files that have spaces in their names | |
message="$(git log --pretty=format:'%s' -n1)" | |
git status --porcelain --untracked-files=no | while read status file | |
do | |
printf "\n" |
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 | |
# get current dir | |
prog_dir="/opt/$(ls /opt/ | grep gitkraken | grep -v tar)" | |
if [ "$prog_dir" == "/opt/" ] | |
then | |
prog_dir="" | |
fi | |
echo "DIR: $prog_dir" | |
if [ -f $prog_dir/gitkraken ] |
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 [[ ${UID} -ne 0 ]]; | |
then | |
echo 'This script need to be run with root permissions' | |
echo "(we assume you don't have write access to /opt)" | |
exit | |
fi | |
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 [[ ${UID} -ne 0 ]]; | |
then | |
echo 'This script need to be run with root permissions' | |
echo "(we assume you don't have write access to /opt)" | |
exit | |
fi | |
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 sh | |
# If the top line line doesn't work, change to #!/bin/bash | |
# Name: list_users.sh | |
# Purpose: List all normal user and system groups in the system. | |
# Tested on RHEL / Debian Linux / BusyBox / GNU/Linux / Mac OS X Sierra Darwin | |
# Author: Zlatko Minev, based on Vivek Gite, under GPL v2.0+ | |
# Original link: https://www.cyberciti.biz/faq/linux-list-users-command/ | |
# See also: http://tuxthink.blogspot.com/2012/03/look-into-etcpasswdetcshadow-and.html | |
# ----------------------------------------------------------------------------------- |