Skip to content

Instantly share code, notes, and snippets.

View Fuxy22's full-sized avatar

Norbert Fuksz Fuxy22

View GitHub Profile
@Fuxy22
Fuxy22 / bash_aliases.sh
Last active November 7, 2021 01:36
Bash Script functions to Manage /etc/hosts file for adding/removing hostnames.
# remove specified host from /etc/hosts
function removehost() {
if [[ "$1" ]]
then
HOSTNAME=$1
if [ -n "$(grep $HOSTNAME /etc/hosts)" ]
then
echo "$HOSTNAME Found in your /etc/hosts, Removing now...";
sudo sed -i".bak" "/$HOSTNAME/d" /etc/hosts
@Fuxy22
Fuxy22 / keep-presence.py
Created August 20, 2021 12:18
Small python scrypt to keep activity on your PC
#!/usr/bin/env python3
import argparse
import time
from datetime import datetime
from pynput.mouse import Controller as MouseController
from pynput.keyboard import Key, Controller as KeyboardController
mouse = MouseController()
keyboard = KeyboardController()

Keybase proof

I hereby claim:

  • I am fuxy22 on github.
  • I am fuxy (https://keybase.io/fuxy) on keybase.
  • I have a public key ASCF7f-UT3w-Fw6WOs7NrpclJekRbde9OIEs6-NN3C7PWAo

To claim this, I am signing this object:

@Fuxy22
Fuxy22 / .gitlab-ci.yml
Created January 7, 2016 13:21
Gitlab CI docker images and settings for laravel
image: php56
cache:
paths:
- vendor/
- node_modules/
before_script:
- service mysql start
- service apache2 start
@Fuxy22
Fuxy22 / responsive.json
Created December 15, 2015 15:11
Firefox Responsive UI List
[
{
"key": "320x200",
"name": "CGA",
"width": 320,
"height": 200
},
{
"key": "320x240",
"name": "QVGA",

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...