Skip to content

Instantly share code, notes, and snippets.

View ILMostro's full-sized avatar
🎯
Focusing

ILMostro ILMostro

🎯
Focusing
View GitHub Profile
@ILMostro
ILMostro / borgitup
Created April 13, 2020 06:05
Borg backup systemd timer, service, and logging config
# cat /etc/systemd/system/borgitup.service
[Unit]
Description=Create a backup using borg
[Service]
Type=oneshot
Environment=BORG_LOGGING_CONF=/etc/borg/logging.conf
; ExecStart=/usr/local/bin/borgitup
; 20200413 -- preprend a hyphen (-) to ignore error return value
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

# /etc/udev/rules.d/20-bt-auto-enable-a2dp.rules
# hxss
SUBSYSTEM=="bluetooth", ACTION=="add", RUN+="/home/replace-it/bt-auto-enable-a2dp.sh"
The following procedure prevents mysql passwords from showing up in your mysql or bash history.
### Create random password
// create random password with openssl
$ openssl rand -base64 32 | head -c 16
wZw0USspr+eTKFNQ
// create random password with python (more complex)
$ python -c "import string;from random import choice; print ''.join([choice(string.ascii_letters + string.digits + string.punctuation) for i in range(16)])"
lD#':_7vxZZW7Sm!
@emrekgn
emrekgn / collect-sysinfo.py
Last active February 19, 2024 18:45
Collect system information (BIOS, CPU, GPU, installed packages, motherboard and more) in a cross-platform manner!
#!/usr/bin/env python
"""
Print (and write to JSON file) system information in a cross-platform manner.
Output contains information about platform, BIOS, CPU, memory, disk, GPU, network, peripheral devices, installed
packages, motherboard and users.
This script heavily relies on psutil and some other bash/powershell commands. See requirements.txt for dependency list.
Section "InputClass"
Identifier "libinput pointer catchall"
Driver "libinput"
MatchIsTouchpad "on"
Option "ScrollMethod" "twofinger"
Option "NaturalScrolling" "true"
EndSection
@ILMostro
ILMostro / gentoo-wip-systemd-selinux.md
Last active December 18, 2019 09:07
Documenting the work done and/or needed on a Gentoo system to make SELinux work with systemd
IRC Logs from the #gentoo-hardened and #selinux IRC channels on FreeNode
2018-01-27 23:13:50	-->	ilmostro (~ilmostro@unaffiliated/ilmostro) has joined #gentoo-hardened
2018-01-27 23:13:50	--	Topic set by Zorry (~quassel@gentoo/developer/zorry) on Wed, 06 Dec 2017 19:01:01
2018-01-27 23:13:51	--	Channel #gentoo-hardened: 270 nicks (9 ops, 38 voices, 223 normals)
2018-01-27 23:13:52	--	Channel created on Sun, 26 Nov 2006 00:42:49
2018-01-27 23:54:23	ilmostro	Does anyone here know why the 17.0 SELinux profile is in "dev" still? I'm on a 17.0 systemd desktop profile right now.  AFAICT, the stable selinux profile is part of the hardened, unversioned profile set.  Has anyone used the 17.0 selinux profile successfully?
2018-01-28 00:29:20	ilmostro	I come from a RHEL background, where, AFAIK, the default SELinux setup is "targeted" with "unconfined" domain enabled.  After reading the wiki page for SELinux/Installation, I realize that might not be as secure as I had assumed. Alterna
@citrusui
citrusui / dropdown.md
Last active April 21, 2024 18:44
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@dearing
dearing / docker-nftables.conf
Created February 25, 2016 14:26
nftables with docker
# /etc/systemd/system/docker.service.d/docker-nftables.conf
# disable iptables in docker, allowing nftables to do work
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --iptables=false
@PolBaladas
PolBaladas / GCI-Task-LoginPage.md
Last active August 27, 2023 05:06
Creating a Login Page with Python Flask and SQLite 3 DB.

Login page using Python, Flask and sqlite3 DB

How-to guide

(Task for GCI 2015-16) Year: 2015-16 This guide will show how to create a simple login page with Flask (a python microframework) and a sqlite3 database.

1. Database Schema and Models

As we are creating a simple user login app we need to store 2 basic values in the database: the username and the password. In order to build the database we need to define a schema: