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 / bundle.js
Created February 10, 2024 14:30
LibreLinkUp Source Code - NativeScript
require("./runtime.js");require("./vendor.js");module.exports =
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([[0],[
/* 0 */,
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribe", function() { return subscribe; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "once", function() { return once; });
@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 / gist:da0c4ac3ec42a9ee156aefb7cded5832
Created February 10, 2019 14:02
Download from dr.dk (Windows guide)
1) Download ffmpeg (https://www.videohelp.com/software/ffmpeg)
2) Unzip .exe files in your windows folder (ex. C:/Windows)
3) Go to the video you want to download. Look in the developer console for XHR request containing index_X_av.m3u8. A file called master.m3u8 contains different m3u8 directories according to which resolution it finds best for your screen. In my case X was 5.
4) Open CMD.
5) Use the command:
ffmpeg -i VIDEO_URL_ENDS_ON_M3U8 -vcodec copy -acodec copy -bsf:a aac_adtstoasc output.mp4
and replace VIDEO_URL_ENDS_ON_M3U8 with the URL that looks something like (https://drod03h-vh.akamaihd.net/i/dk/clear/streaming/7b/zzzzzzzzzzzzzzzzz/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_,273,406,754,1473,2102,3310,.mp4.csmil/index_5_av.m3u8?null=0
@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.