Skip to content

Instantly share code, notes, and snippets.

View zackshapiro's full-sized avatar

Zack Shapiro zackshapiro

View GitHub Profile
# af-magic.zsh-theme
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
# primary prompt
PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%}
$FG[032]%~\
@zackshapiro
zackshapiro / get-fonts.swift
Last active April 23, 2016 14:46 — forked from jbergen/get-fonts
Print font family and font names
for family in UIFont.familyNames() {
print("family: \(family)")
for name in UIFont.fontNamesForFamilyName(family) {
print("name: \(name)")
}
print("")
}
extension NSDateFormatter {
convenience init(format: String) {
self.init()
dateFormat = format
}
}
Exporting IPA from generated Archive...
$ xcodebuild -exportArchive -archivePath "/var/folders/lb/8n5bn9k975qgw662jpqdy7mm0000gn/T/bitrise-xcarchive.4TOLTkLl/storefront.xcarchive" -exportPath "/var/folders/lb/8n5bn9k975qgw662jpqdy7mm0000gn/T/bitrise-xcarchive.sUfa0bhn" -exportOptionsPlist "/Users/vagrant/deploy/export_options.plist"
2016-04-26 07:51:02.436 xcodebuild[2341:8637] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/lb/8n5bn9k975qgw662jpqdy7mm0000gn/T/storefront_2016-04-26_07-51-02.434.xcdistributionlogs'.
2016-04-26 07:51:02.666 xcodebuild[2341:8637] [MT] DeveloperPortal: Using store at URL (file:///Users/vagrant/Library/Developer/Xcode/DeveloperPortal%207.3.db).
2016-04-26 07:51:03.487 xcodebuild[2341:8637] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7ff5724d3330>: Error Domain=IDEDistributionErrorDomain Code=1 "(null)"
error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomai
extension UIColor {
class func fromRGB(rgb: UInt32) -> UIColor {
return UIColor(
red: CGFloat((rgb & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgb & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(rgb & 0x0000FF) / 255.0,
alpha: CGFloat(1.0)
)
}
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: {
app: ['webpack/hot/dev-server', './scripts/app.js']
},
output: {
filename: 'bundle.js',
{
"0": {
"id": 4,
"title": "NYU Law 5",
"description": "baz dev",
"createdAt": "2017-06-15T15:43:39.381Z",
"updatedAt": "2017-08-11T20:46:11.890Z",
"userId": 5,
"opacity": 1,
"glow": 0.5,
Verifying my Blockstack ID is secured with the address 1AVBTaTGz5Feuv8vwMevHnS8WLdLkmb99M https://explorer.blockstack.org/address/1AVBTaTGz5Feuv8vwMevHnS8WLdLkmb99M
@zackshapiro
zackshapiro / UInt256.swift
Created December 4, 2017 21:00
An implementation of UInt256 based off of https://github.com/Jitsusama/UInt128
//
// UInt256.swift
// Raiblocks
//
// Created by Zack Shapiro on 12/4/17.
// Copyright © 2017 Zack Shapiro. All rights reserved.
//
// MARK: Error Type
@zackshapiro
zackshapiro / SendTextField.swift
Last active February 27, 2018 22:10
SendVC.swift
import UIKit
final class SendTextField: UITextField {
init() {
super.init(frame: .zero)
backgroundColor = .clear
textColor = .white
tintColor = .white