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 { | |
FactoryProvider, | |
InjectionToken, | |
Optional, | |
SkipSelf, | |
Type, | |
} from '@angular/core' | |
/** | |
* Helps to make a `forRoot` guard to ensure a module is not imported |
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 | |
[ $# -eq 0 ] && >&2 echo "❌ No files provided as arguments" && exit 1 | |
NOSPACES_FILE_REGEXP="^([0-9]{4})([0-9]{2})([0-9]{2})(.*)$" | |
PARENTHESES_FILE_REGEXP="^\(([0-9]{4})\.([0-9]{2})\.([0-9]{2})\)(.*)$" | |
for filename in "$@"; | |
do | |
new_filename="$filename" | |
printf "\"$filename\"" | |
# No spaces |
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 | |
repos=$(gh repo list --limit 100 --json nameWithOwner | jq -r '.[].nameWithOwner') | |
count=0 | |
echo "{" | |
for repo in $repos; do | |
has_pages="$(gh api repos/"$repo" --jq '.has_pages')" | |
echo " \"$repo\": $has_pages," | |
if [ "$has_pages" = "true" ]; then | |
: $((count+=1)) | |
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
function getNextButton() { | |
return document.querySelector('.podcast-pagination .right_arrow'); | |
} | |
function hasNextButton() { | |
const nextButtonStyle = window.getComputedStyle(getNextButton()); | |
return nextButtonStyle.opacity !== '0' | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); |
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 | |
# | |
# So you have backed up your GPG key using paperkey, and have scanned it | |
# using OCR techniques. However, it's not perfect and some checksums do not match | |
# Some 8s are Bs, 0s are Os... This script will try to spot errors so you | |
# can compare those lines and fix them | |
# | |
# Given a secret key exported using paperkey, tries to decode it. | |
# | |
# In case a CRC checksum wrong is found, a vim editor will be opened |
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 | |
# <bitbar.title>Kraken.com price tickers</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>davidlj95</bitbar.author> | |
# <bitbar.author.github>davidlj95</bitbar.author.github> | |
# <bitbar.desc>Last selected tickers from Kraken.com</bitbar.desc> | |
# <bitbar.image>https://i.imgur.com/iGX2yjR.png</bitbar.image> | |
# <bitbar.dependencies>jq,curl</bitbar.dependencies> | |
# |
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 | |
# | |
# Uses GitHub API to make private all repositories whose name matches the | |
# given grep expression | |
# | |
set -e | |
# Arguments | |
REPO_FILTER="$1" | |
API_BASE_URL="https://api.github.com" |
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 | |
# devel-env are needed to install Python versions | |
cyg-get.bat bash curl make automake gcc-core gcc-g++ zlib zlib-devel libffi-devel | |
curl https://pyenv.run | bash |
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 | |
# tgm: TeleGram send Message | |
# Sends a message via Telegram (using telegram-cli) | |
# Author: davidlj95 | |
# | |
# Telegram CLI: | |
# https://github.com/vysheng/tg | |
# yay -S telegram-cli-git | |
# Constants |
NewerOlder