Skip to content

Instantly share code, notes, and snippets.


Super_Y SuperY

View GitHub Profile
SuperY /
Created Jan 11, 2019 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


SuperY /
Created Jun 28, 2018 — forked from mobilemind/
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
View Decode Array<Any> and Dictionary<String, Any> Swift
import Foundation
// Inspired by
struct JSONCodingKeys: CodingKey {
var stringValue: String
init?(stringValue: String) {
self.stringValue = stringValue
View Client.swift
import Foundation
import Alamofire
import RxSwift
import RxCocoa
protocol ClientProtocol {
func request<Response>(_ endpoint: Endpoint<Response>) -> Single<Response>
View PHPhotoLibrary+PhotoAsset.swift
extension PHPhotoLibrary {
typealias PhotoAsset = PHAsset
typealias PhotoAlbum = PHAssetCollection
static func saveImage(image: UIImage, albumName: String, completion: (PHAsset?)->()) {
if let album = self.findAlbum(albumName) {
saveImage(image, album: album, completion: completion)
SuperY / NavigationPushDoneTodo
Created May 19, 2016
UINavigationController push viewController do some function On main thread
View NavigationPushDoneTodo
self.navigationController?.pushViewController(self.connectingViewController, animated: true)
View private.xml
<?xml version="1.0"?>
<name>F19 to F19</name>
<appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, send escape)</appendix>
SuperY / ATableCell
Last active Aug 29, 2015
TableView Cell Animation
View ATableCell
@implementation ATableCell
- (void)awakeFromNib{}
- (void)startAnimationWithDelay:(CGFloat)delayTime{
_tipView.transform = CGAffineTransformMakeTranslation(SCREENWIDTH, 0);
[UIView animateWithDuration:1. delay:delayTime usingSpringWithDamping:0.6 initialSpringVelocity:0
self.tipView.transform = CGAffineTransformIdentity;
View UIView+TLLayout.h
#import <UIKit/UIKit.h>
@interface UIView (TLLayout)
@property (nonatomic, strong) NSArray *hiddenConstraints;
// set hidden and remove any constraints involving this view from its superview
- (void)hideAndRemoveConstraints;
- (void)showAndRestoreConstraints;
View UINavigationBar+CustomHeight.h
// UINavigationBar+CustomHeight.h
// Copyright (c) 2014 Maciej Swic
// 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
You can’t perform that action at this time.