Skip to content

Instantly share code, notes, and snippets.

View kellpossible's full-sized avatar

Luke Frisken kellpossible

View GitHub Profile
@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 / 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 / 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
struct A<'a> {
s: &'a String
}
struct B<'a> {
a: A<'a>,
s: String
}
impl<'a> B<'a> {
@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();
@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 / 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