Skip to content

Instantly share code, notes, and snippets.

View anachronic's full-sized avatar

Nicolás Salas V. anachronic

View GitHub Profile
@erwanosouf
erwanosouf / openssh2rsa
Created August 4, 2022 16:11
OpenSSH Private Key to RSA
# OpenSSH Private Keys have a specific format
# It cannot be read by openssl and gives that error :
# Could not read private key from id_rsa
# I also tried with ssh-keygen
# > ssh-keygen -if id_rsa -m PEM
# That gives
# > do_convert_from_pem: unrecognised raw private key format
# The solution is to use ssh-keygen and to change the passphrase :
ssh-keygen -p -N "" -m pem -f id_rsa
@schmich
schmich / ducky.md
Last active September 24, 2024 08:54
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@radupotop
radupotop / gist:4013294
Created November 4, 2012 19:48
PolKit rules to allow mounting, rebooting and network management without a password
// /etc/polkit-1/rules.d/10-rules.rules
// PolKit rules to allow mounting, rebooting and network management without a password.
// User needs to be in storage, power and network groups.
polkit.addRule(function(action, subject) {
if (action.id.match("org.freedesktop.udisks2.") && subject.isInGroup("storage")) {
return polkit.Result.YES;
}
});
@gcollazo
gcollazo / fabfile.py
Created July 28, 2010 17:16 — forked from onyxfish/fabfile.py
Sample fabfile.py
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"