Skip to content

Instantly share code, notes, and snippets.

View ewe2's full-sized avatar
🎯
debugging github

Sean Dwyer ewe2

🎯
debugging github
View GitHub Profile
#!/usr/bin/env python3
# Recursively generate index.html files for
# all subdirectories in a directory tree
import argparse
import fnmatch
import os
import sys
#!/usr/bin/env python
# requires Python 2
# (Python 3 version: https://gist.github.com/glowinthedark/174df43f469c7ef05f6358f53afe05c6)
# Recursively generate index.html files for
# all subdirectories in a directory tree
import argparse
import fnmatch

Keybase proof

I hereby claim:

  • I am ewe2 on github.
  • I am sklong (https://keybase.io/sklong) on keybase.
  • I have a public key ASArvsAh4aMsykorjbTJ-CzuH-qxkyi0cSecatgs2LYLrAo

To claim this, I am signing this object:

@ewe2
ewe2 / TrueColour.md
Created August 24, 2019 02:07 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@ewe2
ewe2 / number2roman.sh
Created August 14, 2019 01:42 — forked from pysysops/number2roman.sh
Convert numbers to Roman numerals
#!/bin/bash
set -eu -o pipefail
number=$1
# Test that it is valid
[[ "${number//[0-9]/}" == "" ]] || \
{ echo Number ${number} contains invalid characters ; \
exit 1 ;}
@ewe2
ewe2 / roman2number.sh
Created August 14, 2019 01:42 — forked from pysysops/roman2number.sh
Convert roman numerals to a number in BASH
#!/bin/bash
set -eu -o pipefail
roman_numerals=$(echo $1 | tr a-z A-Z)
# Test that it is valid
[[ "${roman_numerals//[IVXLCDM]/}" == "" ]] || \
{ echo Roman numerals ${roman_numerals} contains invalid characters ; \
exit 1 ;}
@ewe2
ewe2 / ubxconfig.sh
Created August 12, 2019 07:21 — forked from hdoverobinson/ubxconfig.sh
Configure u-blox GPS/GNSS modules with Bash
#!/bin/bash
###AUTHOR###
#Harry Dove-Robinson 5/8/2017
#harry@doverobinson.me
#https://gist.github.com/hdoverobinson
#https://github.com/hdoverobinson
###USAGE###
#This is a script used to configure u-blox GPS/GNSS modules from a text file generated by u-center.
@ewe2
ewe2 / tmux_cheatsheet.markdown
Created December 28, 2018 03:26 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@ewe2
ewe2 / twitter-killjunk.js
Created December 1, 2018 17:52 — forked from freem/twitter-killjunk.js
disabling extraneous twitter features
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
[data-component-context="suggest_recap"],
[data-component-context="suggest_who_to_follow"],
[data-component-context="suggest_activity"],
[data-component-context="suggest_activity_tweet"],
[data-component-context="suggest_recycled_tweet_inline"],
[data-component-context="suggest_recycled_tweet"],
@ewe2
ewe2 / markdown-text-101.md
Created August 30, 2018 10:26 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__