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'] |
# 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 |
#!/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 |
This is an example of how to convert notes from OneNote into Markdown to use in other, less annoying Note applications. I am using PowerShell on Windows here, but other shell/scripting environments would work as well. If you want separate .md
files, you'll need to export your OneNote pages separately. Exporting a section, or a selection of pages creates a single .docx
file.
.docx
(Word) format using OneNote export from the File menu.docx
files into a directory#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |
#!/bin/bash | |
# CONST 1GB | |
CONST_1GB="1024*1024*1024" | |
# VARIABLE WORKERS | |
CMD_W=0 |