Skip to content

Instantly share code, notes, and snippets.

@rjl6789
rjl6789 / squash-commits.md
Created July 17, 2019 05:24 — forked from longtimeago/squash-commits.md
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch:

@rjl6789
rjl6789 / encrypted_swap_hibernation_debian9.md
Last active September 2, 2024 08:08 — forked from HacKanCuBa/encrypted_swap_hibernation_debian9.md
Encrypted SWAP hibernation in Debian 9+

Encrypted SWAP hibernation in Debian 9

NOTE: As mentioned below in comments this applies only to older versions of debian (title changed) and should not be applied to recent versions

It took me about 6 hours to find out all of this, but after reading a ton of man pages, initram scripts, and bug reports, I got a working result that takes about 2' to set up...

The point is to have a SWAP partition encrypted with LUKS, and it should be decypted during boot.

When using SysV, initram hooks and scripts in Debian worked like a charm but then, Systemd came and it's not yet fully implemented so this kind of crap happens. Systemd's cryptsetup doesn't support parameters in /etc/crypttab so using a script there is ignored:

@rjl6789
rjl6789 / brightnessControl.sh
Created July 7, 2019 18:26 — forked from Blaradox/brightnessControl.sh
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a