Skip to content

Instantly share code, notes, and snippets.

View danifr's full-sized avatar
🐧

Daniel Fernández danifr

🐧
View GitHub Profile
@danifr
danifr / config.txt
Created March 22, 2020 14:10
Minimal raspbian config for Raspberry Pi 2
# Disables non core units, disables swap, creates new user, updates system
systemctl disable bluetooth.service
systemctl disable rpi-display-backlight.service
systemctl disable rpi-eeprom-update.service
systemctl disable wpa_supplicant.service
systemctl disable avahi-daemon.socket
systemctl disable avahi-daemon.service
systemctl disable dbus-org.freedesktop.Avahi.service
systemctl disable dbus-org.freedesktop.timesync1.service
@danifr
danifr / yubikey-reset.sh
Created March 19, 2020 12:50 — forked from pkirkovsky/yubikey-reset.sh
Utility for resetting a Yubikey to factory defaults using gpg-connect-agent. This will wipe out any stored keys and reset PINs to default values.
gpg-connect-agent <<EOF
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
@danifr
danifr / README-fail2ban-keycloak.md
Last active April 11, 2022 15:00 — forked from drmalex07/README-fail2ban-keycloak.md
Use fail2ban to block brute-force attacks to keycloak server. #keycloak #fail2ban #brute-force-attack #centos7 #nginx

Tested on Centos 7. Deployent: Keycloak with an Nginx proxy_pass

Add regular-expression filter under /etc/fail2ban/filter.d/keycloak.conf:

[INCLUDES]

before = common.conf

[Definition]
pm uninstall -k --user 0 com.google.android.apps.tachyon &&
pm uninstall -k --user 0 com.google.android.music &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.sheets &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.slides &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.docs &&
pm uninstall -k --user 0 com.google.android.videos &&
pm uninstall -k --user 0 com.android.gallery3d &&
pm uninstall -k --user 0 com.android.calendar &&
pm uninstall -k --user 0 com.evernote &&
pm uninstall -k --user 0 com.evernote.promohelper &&
@danifr
danifr / Arch_Linux_guide.md
Created June 4, 2016 17:18
Arch Linux guide: the always up-to-date Arch Linux tutorial (by Swapnil Bhartiya from muktware.io)

Find the original article written by Swapnil Bhartiya here: http://www.muktware.io/arch-linux-guide-the-always-up-to-date-arch-linux-tutorial/

Arch Linux guide: the always up-to-date Arch Linux tutorial

Download the latest ISO image of Arch Linux. Once you have downloaded the image it’s time to create a bootable USB drive. If you are on a Linux or Mac OS machine, you can use the ‘dd’ utility. If you are on a Windows system then you will have to use tools such as Rufus or USBWriter. If you have Cygwin installed on your Windows machine, then you can also use the ‘dd’

@danifr
danifr / git_lg_alias
Created June 2, 2015 14:05
Git lg alias
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
@danifr
danifr / CERN_OpenAFS.md
Last active September 9, 2020 21:52
Install and configure CERN OpenAFS on Fedora 20/21/22 Centos 7/7.1 and RHEL

Before you start...

I wrote a small script to automate all this process.

Also...

**********************************************************************************************************
  BUGS, COMMENTS, SUGGESTIONS, PLEASE OPEN AN ISSUE --> https://github.com/danifr/miscellaneous/issues
**********************************************************************************************************