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
@ATouhou
ATouhou / libre-link-up-http-dump.md
Created January 25, 2024 15:19 — forked from khskekec/libre-link-up-http-dump.md
HTTP dump of Libre Link Up used in combination with FreeStyle Libre 3
@ATouhou
ATouhou / how-to-squash-commits-in-git.md
Created August 10, 2018 18:25 — forked from patik/how-to-squash-commits-in-git.md
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:

@ATouhou
ATouhou / study_template.py
Created February 4, 2018 23:19 — forked from Sisyphus67/study_template.py
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,
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
@ATouhou
ATouhou / dedupe.py
Created June 16, 2017 18:52 — forked from jalaziz/dedupe.py
Tabs Outliner Deduplication
import json
import os
export_file = 'tree-exported-Sat-Apr-09-2016.tree'
backup_export_file = '{}.bak'.format(export_file)
new_tree = []
seen_urls = set()
os.rename(export_file, backup_export_file)
@ATouhou
ATouhou / Function.Array-Group-By.php
Created August 24, 2016 16:34 — forked from mcaskill/Function.Array-Group-By.php
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.