Skip to content

Instantly share code, notes, and snippets.

View mluerig's full-sized avatar

Moritz Lürig mluerig

View GitHub Profile
@maksimKorzh
maksimKorzh / notepad.py
Created October 5, 2019 14:23
Minimalist python tkinter text editor
#
# Simple code editor with syntax highlighting
#
# import Libraries
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
# create new file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jannismain
jannismain / CompactJSONEncoder.py
Last active October 25, 2024 15:50
A JSON Encoder in Python, that puts small lists on single lines.
#!/usr/bin/env python3
from __future__ import annotations
import json
class CompactJSONEncoder(json.JSONEncoder):
"""A JSON Encoder that puts small containers on single lines."""
CONTAINER_TYPES = (list, tuple, dict)
@felipe-araujo
felipe-araujo / merge.py
Last active December 27, 2019 11:18
Merge several gpx files into one
import gpxpy.parser as parser
import gpxpy.gpx as gpx
import os
import math
import datetime
## functions
def min_max_timestamp(parsed):
min_ts = parsed.tracks[0].segments[0].points[0].time
max_ts = parsed.tracks[0].segments[0].points[0].time
@jult
jult / .stglobalignore
Last active July 26, 2024 20:21
syncthing ignore file(s) .stglobalignore and .stignore
// .stglobalignore
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc.
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment!
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced.
// Ignores are case sensitive.
// Put both .stignore and this .stglobalignore in the root of your sync folder(s) (where .stfolder resides)
$RECYCLE.BIN
$WINDOWS.~BT
@cobyism
cobyism / gh-pages-deploy.md
Last active October 29, 2024 07:35
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@Enrix835
Enrix835 / enrixpad
Created May 21, 2009 17:45
a simple text editor written in python
#enrixpad 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 3 of the License, or
#(at your option) any later version.