Skip to content

Instantly share code, notes, and snippets.

View C-Duv's full-sized avatar

Duvergier Claude C-Duv

View GitHub Profile
@atcuno
atcuno / gist:3425484ac5cce5298932
Last active March 25, 2024 13:55
HowTo: Privacy & Security Conscious Browsing

The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.

I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.

Table of Contents

@jpatters
jpatters / HeidiDecode.js
Last active March 20, 2024 14:29
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));
@thomasdarimont
thomasdarimont / readme.md
Last active March 15, 2024 08:56
Example for decoding a JWT Payload with your Shell (bash, zsh...)

Setup

Add this to your .profile, .bashrc, .zshrc...

decode_base64_url() {
  local len=$((${#1} % 4))
  local result="$1"
  if [ $len -eq 2 ]; then result="$1"'=='
  elif [ $len -eq 3 ]; then result="$1"'=' 
  fi
 echo "$result" | tr '_-' '/+' | openssl enc -d -base64
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@apolloclark
apolloclark / postgres cheatsheet.md
Last active March 7, 2024 13:53
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@QuietNoise
QuietNoise / G910 Keyboard Fix.ahk
Last active March 7, 2024 11:34
G910 Keyboard Fix for double typing problem
;What does this script do?
;It's a workaround for broken G910 Logitech keyboards (possibly other keyboards too) whereby some keys occasionally register multiple keystrokes for one kkkkkeypress.
;The key bug appears because keyboard registers multiple keystrokes in a very short timespan even though you pressed the key only once.
;This script makes it so the subsequent keystrokes registered in a very short timespan are ignored thus outputing the key only for the first stroke.
;List all your broken keys between quotes below. I.e. if your broken keys are g and f then the line below shoud be
;brokenKeys := "gf"
brokenKeys := "gf"
@VolMi
VolMi / meld-diff.nemo_action
Created May 16, 2013 22:59
Nemo action "Compare with meld"
[Nemo Action]
Active=true
Name=Compare with meld
Name[de]=Mit meld vergleichen
Name[fr]=Comparer avec meld
Name[nl]=Vergelijk met meld
Comment=Show differences between files or directories
Comment[de]=Zeige Unterschiede zwischen Dateien oder Ordnern
@maxried
maxried / $README.md
Last active January 12, 2024 10:43
Automatically Sign Kernels After Installation

This script goes into /etc/kernel/postinst.d. You have to make it executable by root, e.g. chown root:root /etc/kernel/postinst.d/00-signing ; chmod u+rx /etc/kernel/postinst.d/00-signing. It assists you with automatically signing freshly installed kernel images using the machine owner key in a way similar to what dkms does. This is mainly useful if you want to use mainline kernels on Ubuntu on Secure Boot enabled systems. This needs shim-signed to be set up. If you have questions this one might help you: While I made this for Ubuntu 20.04, it should work on current Debian based distributions. YMMV.

@daladim
daladim / run-as-cron.sh
Last active November 6, 2023 09:42
Run a command or a script as cron would
#!/bin/bash
# Run as if it was called from cron, that is to say:
# * with a modified environment
# * with a specific shell, which may or may not be bash
# * without an attached input terminal
# * in a non-interactive shell
# This scripts supports cron jobs run by any user, just run it as the target user (e.g. using sudo -u <username>)
# An up-to-date version of this script may be available at https://github.com/daladim/run-as-cron
@regnauld
regnauld / ipam-tools.md
Last active November 6, 2023 01:27
Overview of IPAM/DCIM tools - July 2016