Skip to content

Instantly share code, notes, and snippets.

Norbert Fuksz Fuxy22

View GitHub Profile
@Fuxy22
Fuxy22 / bash_aliases.sh
Last active Mar 25, 2019
Bash Script functions to Manage /etc/hosts file for adding/removing hostnames.
View bash_aliases.sh
# 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 / .gitlab-ci.yml
Created Jan 7, 2016
Gitlab CI docker images and settings for laravel
View .gitlab-ci.yml
image: php56
cache:
paths:
- vendor/
- node_modules/
before_script:
- service mysql start
- service apache2 start
@Fuxy22
Fuxy22 / responsive.json
Created Dec 15, 2015
Firefox Responsive UI List
View responsive.json
[
{
"key": "320x200",
"name": "CGA",
"width": 320,
"height": 200
},
{
"key": "320x240",
"name": "QVGA",
View gpg-import-and-export-instructions.md

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...
You can’t perform that action at this time.