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 / awesome-go.md
Last active December 1, 2021 15:14
Awesome Go Packages
@metafloor
metafloor / zpl-quick-reference.md
Last active November 13, 2024 10:44
ZPL Quick Reference

ZPL Commands

Command Format Description
^A ^Afo,h,w,d:f.x Use Scalable/Bitmapped Font
^A@ ^A@o,h,w,d:f.x Use Font Name to Call Font
^B0 ^B0a,b,c,d,e,f,g Aztec Bar Code Parameters
^B1 ^B1o,e,h,f,g Code 11 Bar Code
^B2 ^B2o,h,f,g,e,j Interleaved 2 of 5 Bar Code
^B3 ^B3o,e,h,f,g Code 39 Bar Code

JSON-RPC pipeline batches

Typical RPC implementation

Say we want to implement an RPC service for basic maths operations. For example, let's calculate the value of ln(e^2). This calculation has several steps in our maths API:

  1. Get the value of e
  2. Square e
@buechner
buechner / UIImageView+fixVectorTemplate.swift
Created August 2, 2016 10:01
Fixing a bug in XCode, where a vector image set as template can not be tinted in Interface Builder: http://openradar.appspot.com/18448072
import UIKit
// fixing Bug in XCode
// http://openradar.appspot.com/18448072
extension UIImageView {
override public func awakeFromNib() {
super.awakeFromNib()
self.tintColorDidChange()
}
}
@maxvt
maxvt / infra-secret-management-overview.md
Last active November 1, 2024 21:34
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active November 12, 2024 14:24
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@jasdev
jasdev / CustomCell.swift
Last active July 6, 2018 17:29
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"
}

Values of macros from TargetConditionals.h.

Xcode 7 / iOS 9.1, tvOS 9.0, watchOS 2.0, OS X 10.11 SDKs

Macro 🖥 📱 📱sim ⌚️ ⌚️sim 📺 📺sim
TARGET_OS_MAC 1 1 1 1 1 1 1
TARGET_OS_IPHONE 0 1 1 1 1 1 1
TARGET_OS_IOS 0 1 1 0 0 0 0
TARGET_OS_WATCH 0 0 0 1 1 0 0
@ststeiger
ststeiger / MySQL_Portable.txt
Last active April 5, 2020 23:56
How to work with MySQL portable on Windows
mysqld.exe --skip-grant-tables
mysql
UPDATE mysql.user SET Password=PASSWORD('TopSecret') WHERE User='root';
FLUSH PRIVILEGES;
"D:\Programme\mariadb-10.0.12-winx64\bin\mysqld.exe"
@alecthomas
alecthomas / IO.swift
Created July 8, 2015 13:38
Swift IO
//
// Swift.IO
//
// Created by Alec Thomas on 25/02/2015.
// Copyright (c) 2015 SwapOff. All rights reserved.
//
//
// This file provides a consistent, simple interface to stream-based data sources.
// It is based on Go's I/O library.
//