Skip to content

Instantly share code, notes, and snippets.

View tooolbox's full-sized avatar

Matt Mc tooolbox

  • Non-Profit
  • Los Angeles, California
View GitHub Profile
@tooolbox
tooolbox / kf7-css.js
Last active August 29, 2015 14:27
NodeJS for KF7 CSS Processing
#!/usr/bin/env node
// The above "shebang" tells the bash terminal to run this script as a Node.js script.
// Import NodeJS packages
var argv = require('yargs').argv; // for processing command-line arguments
var fs = require("fs"); // filesystem
var wrench = require('wrench'); // for deep recursive copying
var css = require('css'); // for parsing CSS into an AST
var walk = require('rework-walk'); // for walking ASTs generated by the css module
var cheerio = require('cheerio'); // jquery-like access to an HTML document
@tooolbox
tooolbox / CustomCell.swift
Created February 12, 2018 06:06 — forked from jasdev/CustomCell.swift
An approach to safer UITableViewCell and UICollectionViewCell reuse
class CustomCell: UITableViewCell, Reusable {
class var reuseIdentifier: String {
return "customCell"
}
}
class SupaHotCustomCell: CustomCell {
override class var reuseIdentifier: String {
return "supaHotCustomCell"
}

Software Proverbs

  • Clear is better than clever. --Rob Pike
  • Software engineering is what happens to programming when you add time and other programmers. --Russ Cox
  • Programs must be written for people to read, and only incidentally for machines to execute. --Hal Abelson and Gerald Sussman
  • The most important skill for a programmer is the ability to effectively communicate ideas. --Gaston Jorquera
  • Design is the art of arranging code to work today, and be changeable forever. --Sandi Metz
  • If it’s a core business function — do it yourself, no matter what. --Joel Spolsky
  • Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it --Brian Kernighan
@tooolbox
tooolbox / protobuf.md
Last active September 28, 2019 18:26
The protobuf documentation you wish you had when you started

Generally: protoc -flag param:param:param target-file.proto --plugin_flag=key=value,key=value:./dest/

For example: protoc -I .:.. foo.proto --go_out=plugins=grpc,paths=source_relative:.

This means:

  1. Run protoc on foo.proto
  2. Any other proto files in the current directory or the parent directory should be available for import.
  3. Generate a foo.pb.go file for gRPC using protoc-gen-go.
@tooolbox
tooolbox / iTerm2MacKeys.itermkeymap
Created March 22, 2020 04:01
My iTerm2 keybindings for Mac (as of Catalina)
{
"Touch Bar Items": [],
"Key Mappings": {
"0xf72d-0x20000": {
"Text": "",
"Action": 8
},
"0xf72b-0x100000": {
"Text": "",
"Action": 4
@tooolbox
tooolbox / monokai-light.json
Last active April 8, 2020 19:16
Monokai Light theme for Chime
{
"display_name": {
"en": "Monokai Light"
},
"colors": {
"editor.background": "#fafafa",
"editor.selection": "#ccc9ad",
"editor.insertion-point": "#666663",
"syntax.default": "#000000",
@tooolbox
tooolbox / chime-wishlist.md
Last active September 14, 2020 17:31
List of feature requests or bug reports for Chime

Moved into comments

...To support emoji and screenshots.

@tooolbox
tooolbox / chime.sh
Last active April 9, 2020 03:00
Script for launching Chime from the command line
#! /bin/sh
# Copy to /usr/local/bin/chime
# Use:
# cd my-project
# chime .
open -a /Applications/Chime.app/Contents/MacOS/Chime $@
@tooolbox
tooolbox / good-software.md
Created April 16, 2020 05:10
Where good software comes from, by Melinda Varian
  1. Really good software can be written only by very small groups of very skilled programmers.
  2. Really good software is almost always a labor of love.
  3. Really good software is almost always begun because the author himself needs it; it makes his computer do something that he really wants it to do.
  4. Really good software is never finished; it continues to grow. If it doesn’t grow, it decays.
  5. To evolve into really good software, a program or system must be “hacked at”.
  6. To evolve into really good software and remain good, a program or system must develop an intelligent, adventurous, passionate user community with enough influence to be able to guide its further development.