Skip to content

Instantly share code, notes, and snippets.

@imryan
imryan / paybear-qr.swift
Last active February 28, 2018 19:11 — forked from aamnah/google_api_qrcode.php
Generate a QR code using Google Charts API (for Paybear transactions)
// Type
let cht = "qr"
// Size
let chs = "180x180"
// Transaction message
let chl = "ethereum:\(walletAddress)?amount=\(amount)&message=\(message)" // URL-encode
// Final URL
@imryan
imryan / import_minimizer.rb
Created January 11, 2017 16:33 — forked from Orangenhain/import_minimizer.rb
Script that takes a ObjC .m file and tries to find unused (or duplicate) import statements by commenting out each #import line in turn and seeing if the project still compiles. You will have to change BUILD_DIR & BUILD_CMD.
#!/usr/bin/env ruby -w
class String
def starts_with?(prefix)
prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix
end
end
HEADER_REGEX = /^#import\s+["<](.*)[">]/