Skip to content

Instantly share code, notes, and snippets.

View xputerax's full-sized avatar
⚒️
hacking

ad xputerax

⚒️
hacking
View GitHub Profile
@dsample
dsample / .editorconfig
Last active May 9, 2021 20:29
Some files which I usually include within a repo's 'first commit'
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
indent_style = space
indent_size = 2
@apih
apih / billplz-xsignature.php
Last active November 6, 2022 16:33
X Signature verification sample
<?php
function buildSourceString($data, $prefix = '')
{
uksort($data, function($a, $b) {
$a_len = strlen($a);
$b_len = strlen($b);
$result = strncasecmp($a, $b, min($a_len, $b_len));
if ($result === 0) {
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 29, 2024 03:51
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 1, 2024 19:56
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@shamil
shamil / mount_qcow2.md
Last active April 25, 2024 09:25
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 30, 2024 19:47
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)