lazygit "My commit msg"
function lazygit() {
git add .
git commit -a -m "$1"
git push
}
How do I reduce the pack file size?
import json | |
from typing import List | |
def run(args: List[str]): | |
filename = args[0] | |
with open(filename, "r") as f: | |
data = json.loads(f.read()) | |
original_entries = data['items'] |
#!/bin/bash | |
# source : https://www.howtogeek.com/442332/how-to-work-with-variables-in-bash/ | |
echo "There were $# command line parameters" | |
echo "They are: $@" | |
echo "Parameter 1 is: $1" | |
echo "The script is called: $0" | |
# any old process so that we can report on the exit status | |
pwd | |
echo "pwd returned $?" |
# WSL2 network port forwarding script v1 | |
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell, | |
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter. | |
# written by Daehyuk Ahn, Aug-1-2020 | |
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass | |
# Display all portproxy information | |
If ($Args[0] -eq "list") { | |
netsh interface portproxy show v4tov4; |
- name: "get files from dir" | |
find: | |
paths: "/some/dir/foo" | |
register: found_files | |
- name: print file names without path | |
debug: | |
msg: "{{ found_files['files'] | map(attribute='path') | map('regex_replace','^.*/(.*)$','\\1') | list }}" |
# Backup mysql databases into seperate files | |
USER="mysql-username" | |
PASSWORD="mysql-password" | |
OUTPUTDIR="/path/to/db/backup/dir" | |
MYSQLDUMP="/usr/bin/mysqldump" | |
MYSQL="/usr/bin/mysql" | |
NOW=$(date +"%m-%d-%Y") | |
MSG="Just to let you know that a full backup of db has been made onto the VPS.Kind Regards" | |
# Remove previous backups |
* SSH with Putty to RaspberryPi | |
- sudo apt-get install screen | |
- screen -t SSH2Syno | |
- ssh -l admin synohostname -p 44344 ( I use a different port than the industry standard of 22 - for security purposes ) | |
* Now, you're terminal is what you're doing on the Synology | |
- do what commands you wish | |
- Ctrl-A Ctrl-D (to detach - put screen in background) | |
* Now you're back on the Raspberry Pi |
# $credentials="<github_access_token>" | |
$repo = "fusioninventory/fusioninventory-agent" | |
$file = "fusioninventory-agent_windows-x64_*.exe" | |
$latestRelease = Invoke-WebRequest https://github.com/$repo/releases/latest -Headers @{"Accept"="application/json"} | |
$json = $latestRelease.Content | ConvertFrom-Json | |
$latestVersion = $json.tag_name | |
$latestVersionFile = "fusioninventory-agent_windows-x64_$latestVersion.exe" |
#!/bin/bash | |
set -euo pipefail | |
BLOCKLIST_URL='https://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz' | |
BLOCKLIST_FILE=/var/packages/DownloadStation/etc/download/blocklists/level1 | |
echo "Clean old blocklist" | |
rm -f $(dirname $BLOCKLIST_FILE)/* | |
echo "Download new blocklist" |
lazygit "My commit msg"
function lazygit() {
git add .
git commit -a -m "$1"
git push
}
How do I reduce the pack file size?
// created this flow file to archive my starred repos | |
// it prints the list of starred repos by github user | |
// you can get TagUI here (macOS / Windows / Linux) | |
// https://github.com/kelaberetiv/TagUI#set-up | |
// usage #1 - copy or download this file, then run | |
// tagui stars github_userid quiet chrome | |
// usage #2 - if you want to run this gist directly |