Skip to content

Instantly share code, notes, and snippets.

View mofax's full-sized avatar
🎯
Focusing

Alloys Mila mofax

🎯
Focusing
View GitHub Profile
@mofax
mofax / scrape_entire_website_with_wget.sh
Created April 12, 2023 12:46 — forked from pe3/scrape_entire_website_with_wget.sh
Scrape An Entire Website with wget
this worked very nice for a single page site
```
wget \
--recursive \
--page-requisites \
--convert-links \
[website]
```
wget options
@mofax
mofax / kubernetes-ingress-example.yaml
Created September 17, 2021 04:22 — forked from alexellis/kubernetes-ingress-example.yaml
kubernetes-ingress-example.yaml
# From my webinar for Sysdig - Exploring Kubernetes 1.18
# Create A KinD or k3s cluster with no IngressController
# Run `arkade install ingress-nginx` to add IngressNginx to the cluster as your IngressController
# Save and apply all the Kubernetes YAML files below
# Forward the IngressController
# kubectl port-forward ingress-nginx-controller 8080:80
@mofax
mofax / encryption.js
Created February 19, 2020 12:09 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@mofax
mofax / perfectelementary.bash
Created March 15, 2019 20:39 — forked from ezeeyahoo/perfectelementary.bash
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#https://elementary.io/
#Clean-up System
sudo apt-get purge midori-granite -y
sudo apt-get purge yelp -y
sudo apt-get purge evince -y
sudo apt-get purge gnome-orca -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
@mofax
mofax / a2dp.py
Created February 12, 2019 06:01 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@mofax
mofax / postgres-cheatsheet.md
Created November 20, 2018 12:00 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@mofax
mofax / Git push deployment in 7 easy steps.md
Created November 4, 2015 09:29 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook