Skip to content

Instantly share code, notes, and snippets.

@neo504
neo504 / BorderDesignable.swift
Created April 12, 2020 11:32 — forked from mosluce/BorderDesignable.swift
Protocol Oriented 結合 UIView 及 IBDesignable+IBInspectable 練習
//
// BorderDesignable.swift
// Gotyou
//
// Created by 默司 on 2016/11/28.
// Copyright © 2016年 默司. All rights reserved.
//
import Foundation
import UIKit
@neo504
neo504 / 0fixup.md
Created March 24, 2020 14:41 — forked from silent1mezzo/0fixup.md
On undoing, fixing, or removing commits in git

A git choose-your-own-adventure!

This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. It isn't that git is so complicated that you need a large document to take care or your particular problem, it is more that the set of things that you might have done is so large that different techniques are needed depending on exactly what you have done and what you want to have happen.

@neo504
neo504 / RoundImageView.swift
Created March 24, 2020 07:53 — forked from wiemerm/RoundImageView.swift
@IBDesignable to create a round UIImageView
import UIKit
@IBDesignable class RoundImageView: UIImageView {
private var _round = false
private var _borderColor = UIColor.clearColor()
private var _borderWidth: CGFloat = 0
@IBInspectable var round: Bool {
set {
@neo504
neo504 / countries.json
Created March 22, 2020 08:32 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@neo504
neo504 / LICENSE
Created March 22, 2020 08:21 — forked from lukeredpath/LICENSE
A decorator around UILocalizedIndexedCollation that automatically adds the search icon. Updated to support ARC.
Copyright (c) 2010 Luke Redpath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
//
// GradientView.swift
// Aura
//
// Created by Egor Sakhabaev on 23.07.17.
// Copyright © 2017 Egor Sakhabaev. All rights reserved.
//
import UIKit
@neo504
neo504 / author-amend.sh
Created March 18, 2020 01:35 — forked from TheCodedSelf/author-amend.sh
Change all commits with author email "bruce.wayne@wayneenterprises.com" to "batman@justiceleague.com"
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="bruce.wayne@wayneenterprises.com"
CORRECT_NAME="The Dark Knight"
CORRECT_EMAIL="batman@justiceleague.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then