This file contains hidden or 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
sudo apt-get install -y xbindkeys xautomation x11-utils | |
xbindkeys --defaults > $HOME/.xbindkeysrc | |
echo " | |
# Back | |
\"xte 'keydown Alt_L' 'keydown Control_L' 'keydown Up' 'keyup Up' 'keyup Control_L' 'keyup Alt_L'\" | |
b:8 | |
# Forward |
This file contains hidden or 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 | |
user="" | |
token="" | |
repo_list=$(curl "https://gitlab.com/api/v4/users/${user}/projects?per_page=1000&access_token=${token}" | jq .[].ssh_url_to_repo | sed -e 's/^"//' -e 's/"$//') | |
for repo in $repo_list | |
do |
This file contains hidden or 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
find . -name '*.jpg' -type f -exec bash -c 'convert -quality 50 "$0" "$0"' {} \; |
This file contains hidden or 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
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup | |
sudo echo "# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://mirror.0x.sg/ubuntu/ focal main restricted | |
# deb-src http://mirror.0x.sg/ubuntu/ focal main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://mirror.0x.sg/ubuntu/ focal-updates main restricted | |
# deb-src http://mirror.0x.sg/ubuntu/ focal-updates main restricted |
This file contains hidden or 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
[wsl2] | |
memory=1GB | |
processors=4 | |
swap=2GB | |
localhostForwarding=true |
This file contains hidden or 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
<powershell> | |
Set-MpPreference -DisableRealtimeMonitoring $true | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install -y microsoft-edge notepadplusplus git nodejs-lts vscode filezilla vlc python winrar putty keepass xdm jq wget openoffice raidrive | |
</powershell> |
This file contains hidden or 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 sys | |
import time | |
import json | |
import boto3 | |
import pyperclip | |
from retrying import retry | |
lightsail_client = boto3.client('lightsail') | |
instance_name = 'My-Instance' | |
instance_snapshot_name = 'My-Instance-Snapshot' |
This file contains hidden or 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 moviepy.editor as moviepy | |
import glob, os | |
files = [] | |
for file in glob.glob('*.ts'): | |
files.append(file) | |
for file in glob.glob('**/*.ts'): | |
files.append(file) | |
for file in glob.glob('**/**/*.ts'): | |
files.append(file) |
This file contains hidden or 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 RPi.GPIO as GPIO | |
import time | |
import speech_recognition as sr | |
import picamera, subprocess, os, sys | |
import threading | |
C_DATA = 23 | |
C_STORE = 24 | |
C_SHIFT = 25 | |
R_DATA = 14 |