Skip to content

Instantly share code, notes, and snippets.

View lildude's full-sized avatar
🐢
Puppeeeeeeee

Colin Seymour lildude

🐢
Puppeeeeeeee
View GitHub Profile
#!/usr/bin/env bash
#
# Export all Omnivore saves to a bookmarks.html file to easy importing into things like Pocket.
#
# Sets the added and modified dates to order is retained in the receiving service if it honours those fields. Pocket does.
#
# Instructions:
#
# 1. Save file to your Linux, macOS or WSL on Windows
# 2. Get an API key from Omnivore. See https://docs.omnivore.app/integrations/api.html
/*
1) Open your calendar on trainerroad
2) Press F12 to open developer tools, select console and paste the script below
3) OPTIONAL - modify the two dates (beg & end) to suit your needs
4) Copy the result of the execution (something like TRData = ...)
*/
(function () {
var beg = '2021-01-01';
var end = '2022-01-01';
function normalizeDate(dat) {
@lildude
lildude / making_language_grammar.md
Created May 7, 2021 09:32 — forked from Aerijo/making_language_grammar.md
Guide to writing an Atom language grammar

A guide to writing a language grammar (TextMate) in Atom

Tree sitter

  • Atom is transitioning to an entirely new way of defining grammars using tree-sitter. This will be enabled by default quite soon now. It is theoretically faster and more powerful than regex based grammars (the one described in this guide), but requires a steeper learning curve. My understanding is that regex based grammars will still be supported however (at least until version 2), so this guide can still be useful. To enable it yourself, go to Settings -> Core and check Use Tree Sitter Parsers

Links for tree-sitter help:

'use strict';
const React = require('react')
module.exports = React.createClass({
render: function() {
let {feeds, log} = this.props;
log.info(feeds);
return <div className="feed-list">
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.
V = 0
Q1 = $(V:1=)
Q = $(Q1:0=@)
ECHO1 = $(V:1=@ :)
ECHO = $(ECHO1:0=@ echo)
NULLCMD = :
# This file contains custom benchmark configs, in addition to the ones generated
# in the source code.
# CUDA 9.x + Volta performance regressions in cuDNN from 7.1.4 to 7.3.0, but then fixed in 7.3.1.
convolution_benchmark {
label: "NHWC_128x20x20x56x160"
input {
dimension: [128, 56, 20, 20]
data_type: DATA_HALF
format: TENSOR_NHWC
@lildude
lildude / v7.11.1-source.lean.json
Created October 26, 2020 14:25
Testing Lean grammars
{
"name": "Lean",
"scopeName": "source.lean",
"patterns": [
{
"include": "#comments"
},
{
"name": "meta.definitioncommand.lean",
"begin": "\\b(?\u003c!\\.)(inductive|coinductive|structure|theorem|axiom|axioms|abbreviation|lemma|definition|def|instance|class|constant)\\b\\s+(\\{[^}]*\\})?",
@lildude
lildude / tablebear
Created December 26, 2018 11:26 — forked from matux/tablebear
How to Tables on Bear app. Copy/paste example _as is_ on a note. (https://www.reddit.com/r/bearapp/comments/8a2k04/how_to_craft_pseudo_tables_on_bear/)
# Playgrounds Markup Cheat Sheet
## Callouts
::Name Description PG QH::
[Note](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Note.html#//apple_ref/doc/uid/TP40016497-CH39-SW1) Adds a Note callout. βœ“ βœ“
[Example](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Example.html#//apple_ref/doc/uid/TP40016497-CH58-SW1) Adds an Example callout. βœ“
[Experiment](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Experiment.html#//apple_ref/doc/uid/TP40016497-CH36-SW1) Adds an Experiment callout. βœ“ βœ“
[Important](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Important.html#//apple_ref/doc/uid/TP40016497-CH37-SW1) Adds an Important callout βœ“ βœ“
[Custom Callout](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/CustomCallouts.html#//apple_re
@lildude
lildude / nft-flush.sh
Created March 20, 2017 12:11
Flush and delete all nftables rules, chains and tables
#!/bin/bash
#
# Name: nft-flush
# Auth: Gavin Lloyd <[email protected]>
# Date: 06 Mar 2014
# Desc: Flush and delete all nftables rules, chains and tables
#
NFT=/usr/bin/nft
FAMILIES="ip ip6 arp bridge"