Skip to content

Instantly share code, notes, and snippets.

View kellpossible's full-sized avatar

Luke Frisken kellpossible

View GitHub Profile
@kellpossible
kellpossible / regex language matching.YAML-tmLanguage
Last active August 29, 2015 13:57
A bunch of tips and tricks for doing regex matching in YAML-tmLanguage for sublime text editor
patterns:
- comment: numbers including with decimal places
name: constant.numeric.eppl
match: (?<=[^a-zA-Z0-9\.])([\-]{0,1}[\d\.]+)
- name: keyword.control.eppl
match: \b(if|else)\b
- comment: match strings
name: string.eppl
@kellpossible
kellpossible / Generate_File_Layout.sh
Created May 19, 2016 04:22
Generate a layout of files and save it to a txt file
find . -not -path "./.git/*" -type d -exec ls -d {} \; > folder_structure.txt
@kellpossible
kellpossible / database.rs
Last active September 27, 2016 07:28
rust lifetime error
pub struct Database<'a> {
pub fixes: Vec<Waypoint<'a>>,
pub countries: HashMap<String, Country>,
}
impl<'a> Database<'a> {
pub fn new(navdata_dir: PathBuf, resources_dir: PathBuf) -> Database<'a> {
let countries_path = resources_dir.join("icao_countries.txt");
let countries_path = countries_path.to_str().unwrap();
struct A<'a> {
s: &'a String
}
struct B<'a> {
a: A<'a>,
s: String
}
impl<'a> B<'a> {
@kellpossible
kellpossible / feh.desktop
Created April 29, 2017 15:02
A desktop file/run configuration that sets feh up to open such that you can scroll through all the other images in the same directory
[Desktop Entry]
Name=Feh
Name[en_US]=feh
GenericName=Image viewer
GenericName[en_US]=Image viewer
Comment=Fast Imlib2-based Image Viewer
Exec=bash -c "feh -. --start-at ./$(realpath --relative-to=$(dirname %f) %f)"
Terminal=false
Type=Application
Icon=feh
@kellpossible
kellpossible / pandoc.css
Created April 19, 2018 04:28 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@kellpossible
kellpossible / settings.json
Created May 7, 2018 02:28
Visual Studio Code settings for markdown heading highlighting to match emacs org mode heading highlighting
{
// heading colours matching Emacs Org Mode
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "markup.heading.markdown punctuation.definition.heading.markdown",
"settings": {
"foreground": "#8a8888",
}
},
@kellpossible
kellpossible / init.el
Created June 12, 2018 04:23
Emacs Monokai Markdown Headings same as Org Mode
(custom-set-faces
'(markdown-header-face-1 ((t (:inherit markdown-header-face :foreground "chocolate1" :height 1.5))))
'(markdown-header-face-3 ((t (:inherit markdown-header-face :foreground "#66d9ef" :height 1.15))))
'(markdown-header-face-4 ((t (:inherit markdown-header-face :foreground "#e6db74" :height 1.1))))
'(markdown-header-face-5 ((t (:inherit markdown-header-face :foreground "#a1efe4")))))
@kellpossible
kellpossible / perfect_documentation_markup_system.md
Last active March 27, 2019 03:43
Thinking about a markup syntax and system which will be perfect for documentation

Perfect Documentation Markup System

I've spent a lot of time over the past few years thinking about markup markup languages and systems in the context of writing documentation for commercial and open source projects. I've had the pleasure of creating a large Sphinx based document for a personal project, and in a user manual for a commercial project. I've also created a number of decent sized MkDocs based documents, and compared them with Sphinx and Hugo based alternatives. I've grappled with the practicalities of introducing such a system into a company that already has established document production workflows, and coming to grips with the fact that document production involves many more people than the original writers, and a system needs to cater for those people also. Throughout all of this, I've come to the conclusion that the current markdown based systems, as good as they are, still have a number of fundamental fl

@kellpossible
kellpossible / git-ac
Created May 7, 2019 06:23
A git script to make commits with messages prepended with issue number extracted from the current branch name.
#!/bin/sh
# A git script to make commits with messages prepended with issue number
# extracted from the current branch name.
# Config Values
ISSUE_TRACKER_URL="http://your-issue-tracker/issues/"
EDITOR_COMMAND="vi -c 'set ft=gitcommit'"
# Issue Number Extraction