Skip to content

Instantly share code, notes, and snippets.

View ATouhou's full-sized avatar
🐢
I may be slow to respond.

Adam Touhou ATouhou

🐢
I may be slow to respond.
  • Denmark, Copenhagen.
View GitHub Profile
@khskekec
khskekec / libre-link-up-http-dump.md
Last active April 28, 2024 04:30
HTTP dump of Libre Link Up used in combination with FreeStyle Libre 3
TYPE CONTENT PRIORITY INDENT AUTHOR RESPONSIBLE DATE DATE_LANG TIMEZONE
task Start studying Chapter One of Cryptography and Cryptanalysis @school 2 1 1234 in 3 days en US/Central
task Study Chapter 1: Cryptography and Cryptanalysis @school 2 1 1234 in 10 days en US/Central
task Read Chapter 1 @school 1 2 1234 in 8 days en US/Central
task Annotate Chapter 1 @school 2 2 1234 in 9 days en US/Central
task Skim Chapter 2 @school 2 2 1234 in 11 days en US/Central
@Sisyphus67
Sisyphus67 / study_template.py
Last active January 19, 2021 12:15
This program outputs a csv file that can be used as a ToDoist template. The template is to create a study plan for a text book.
#!/usr/bin/python
"""
Copyright (C) 2016 Jeffrey S. McAnarney
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
@patik
patik / how-to-squash-commits-in-git.md
Last active October 17, 2023 02:19
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@mcaskill
mcaskill / Function.Array-Group-By.php
Last active January 3, 2024 10:15
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@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'));
@jaboc83
jaboc83 / sigPadCompression.js
Last active May 3, 2021 16:01
jQuery Signature Pad Compression/Decompression algorithm
/** Reinflates a compressed signature string:
resolution = a representation of the resolution in
pixels of the canvas which this signature will be drawn
e.g. {x:800,y:200}
*/
var inflateToJsonSignature = function (deflatedSig, resolution) {
var components = [],
modifier = 1,
compressWithResolution = /^(?:\[(\d+)x(\d+)\])?([\w\W]*)/,
parsedSigString = deflatedSig.match(compressWithResolution),