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
# Debloat | |
sudo apt remove kwrite kwrited kmail akonadi-server juk dragonplayer k3b k3b-data k3b-i18n akregator --auto-remove -y | |
sudo rm -rf /etc/xdg/autostart/org.kde.discover.notifier.desktop /etc/xdg/autostart/org.kde.kdeconnect.daemon.desktop /etc/xdg/autostart/geoclue-demo-agent.desktop | |
# Clone dotfile | |
git clone https://github.com/Saka7/dotfiles.git | |
rm -rf ./dotfiles/.oh-my-zsh | |
cp -R ./dotfiles/.* ./ | |
rm -rf ./dotfiles ./.git |
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
# Title: Ukrainian Security Filter (hosts-based) | |
# Description: Filter of malicious web resources (phishing, online fraud, malware, etc.) targeting Ukrainian citizens | |
# Version: 20240428.01 | |
# Last modified: Thu, 28 April 2024 09:29 EEST | |
# | |
0.0.0.0 0ukr.net | |
0.0.0.0 1webs.top | |
0.0.0.0 1win.pro | |
0.0.0.0 1xbet.ci | |
0.0.0.0 1xbet.com |
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
ALT_MOUSE_INPUT=1 | |
UAC_AWARE=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
# Download image http://download.friendlyarm.com/nanopineo2 | |
# Unzip | |
# Format sd-card and flush img | |
lsblk -p | |
sudo mkfs.vfat /dev/sd* | |
sudo dd if=./*.img of=/dev/sd* bs=4M conv=notrunc status=progress | |
# Find device and connect via ssh | |
ip addr |
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 | |
sudo apt update && sudo apt upgrade | |
# Install correct wifi drivers | |
lspci | grep -i 'Wireless' | |
# Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter | |
sudo apt install firmware-atheros -y |
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
DB_HOST=0.0.0.0 | |
DB_PORT=5432 | |
DB_USER=postgres | |
DB_NAME=postgres | |
DB_SCHEMA=public | |
BACKUP_FILENAME=$DB_SCHEMA | |
# File | |
pg_dump -v -h $DB_HOST -U $DB_USER -d $DB_NAME -W -n $DB_SCHEMA -F c -f $BACKUP_FILENAME.tar.gz |
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
# Download http://download.friendlyarm.com/nanopiduo2 | |
# Unzip | |
# Flash image to sd-card | |
lsblk -p | |
mkfs.vfat /dev/sd* | |
dd if=./*.img of=/dev/sd* bs=4M conv=notrunc status=progress | |
# Configure wpa_supplicant | |
sudo vi ./etc/wpa_supplicant/wpa_supplicant.conf |
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
ssh_user=ubuntu | |
ec2_host=ec2-xxx | |
path_to_keypair="~/keypair.pem" | |
local_port=5432 | |
aurora_port=5432 | |
aurora_endpoint=aurora-serverless-database-x.cluster-x | |
ssh $ssh_user@$ec2_host -i $path_to_keypair -L $local_port:$aurora_endpoint:$aurora_port -fN | |
# psql -U postgres -d postgres -h 0.0.0.0 -W |
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
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 pattern:* |
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 * as knex from 'knex'; | |
const connection = knex({client: 'mysql', /* ... */}); | |
const createTableWithManualTimeMarksQuery = connection.schema.createTableIfNotExists('users', table => { | |
table.increments(); | |
table.timestamp('created_at') | |
.defaultTo(connection.fn.now()) | |
.notNullable(); |