Skip to content

Instantly share code, notes, and snippets.

View lodestone's full-sized avatar
:octocat:
🤘Grokking Out 🤘

Matt Petty lodestone

:octocat:
🤘Grokking Out 🤘
View GitHub Profile
@lodestone
lodestone / TrueColour.md
Last active April 30, 2021 13:38 — forked from XVilka/TrueColour.md
Terminal/Console/Shell Color Sequence Cheat Sheet

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)
@lodestone
lodestone / me-and-blade-chatting.csv
Last active November 6, 2020 15:36
Log of me and Blade the Vampire Hunter have a chat. (Just testing CSV rendering on gist.github.com)
date person message
2020-10-21 22:04:50 Matt Oh hey! Are you Blade? That half-vampire vampire-hunter?
2020-10-21 22:04:52 Blade ___
2020-10-21 22:05:45 Matt Um. Okay yeah. You're busy all hackin' and slashin' all these vamparoonies about.
2020-10-21 22:04:47 Blade ___
2020-10-21 22:05:55 Matt Uh if you ever want to keep your black leather clothes clean and still hack n slash - you can join my D&D game.
2020-10-21 22:06:08 Blade ___
2020-10-21 22:06:15 Blade I will play this Dee and Dee. On one condition - I must play a bard.
2020-10-21 22:06:25 Blade Text the number carved into the chest of this dying vampire before it turns to dust.
@lodestone
lodestone / bulk-remove-iterm-colors.sh
Created May 5, 2020 23:50 — forked from dedy-purwanto/gist:11312110
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
@lodestone
lodestone / _intro.md
Last active March 19, 2018 13:26
A Small Ruby vs Crystal Comparison

A Small Ruby vs Crystal Test

I recently had to write a quick script to update a text file full of pdf annotations. I wrote the script in Ruby then I wondered how much of a difference in speed I would get if I turned it into Crystal. See below.

@CharlieScarver
CharlieScarver / AdventureTime.csv
Last active April 11, 2024 12:46 — forked from austinpray/AdventureTime.csv
List of important adventure time episodes
Season Episode Title Reason
1 5 The Enchiridion A good intro to the series, plus introduces the important Enchiridion
1 2 Trouble in Lumpy Space* Introduces LSP (episode out of order)
1 3 Prisoners of Love Introduces Ice King and his obsession (episode out of order)
1 7 Ricardio the Heart Guy Finn and PB development, Sets a returning plot
1 8 Business Time* First mention of Ooo being post-apocalyptic
1 9 My Two Favorite People Intros the Jake and Lady Rainicorn plotline
1 10 Memories of Boom Boom Mountain A look at how Finn was adopted into Jake's Family
1 12 Evicted! Intros Marceline
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
anonymous
anonymous / init.vim
Created August 28, 2017 03:13
set nocompatible
call plug#begin('~/.vim/plugged')
Plug 'Chiel92/vim-autoformat'
Plug 'Shougo/denite.nvim'
Plug 'Shougo/deoplete.nvim'
Plug 'Shougo/unite.vim'
Plug 'Shougo/vimfiler.vim'
Plug 'Taverius/vim-colorscheme-manager'
@matiaskorhonen
matiaskorhonen / tumblr-to-middleman.rb
Created September 16, 2016 11:03
Tumblr blog post extraction code. Pretty much tailored for my needs when I migrated from Tumblr to Middleman, but this might still be of use to someone…
#!/usr/bin/env ruby
require "tumblr_client"
require "time"
require "yaml"
require "fileutils"
require "open-uri"
require "nokogiri"
require "loofah"
require "reverse_markdown"
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@lodestone
lodestone / atom_opal.md
Created February 15, 2016 09:24 — forked from edubkendo/atom_opal.md
Writing Atom Plugins in Opal (Ruby)

I want to write plugins for Atom's editor in Ruby. Opal makes this possible. Atom is one of several projects in recent times to combine Chromium with Node.js for a desktop app. While it utilizes chromium for it's gui, and boasts "[e]very Atom window is essentially a locally-rendered web page", writing Atom plugins is more like writing a server-side node.js app than a typical single-page client-side app (albeit with really awesome integration with Chrome Devtools). Opal development, on the other hand, has to-date been focused primarily on the browser use-case.

Because of this, I had to make a choice between using the opal-node package from npm, using Opal via Ruby w/ a compile step, or packaging up opal-parser.js, including it with the app, and writing in compilation on the fly. Each choice came with compromises. Using opal-node would have been easiest, just create a top level index.coffee that required opal-node, and then require in your ruby