Skip to content

Instantly share code, notes, and snippets.

View Cyanide7523's full-sized avatar

poca-p0ca Cyanide7523

View GitHub Profile
@Cyanide7523
Cyanide7523 / NotificationBar + extension.swift
Last active August 30, 2018 01:02
NotificationBar & NavigationBar Extension
/**
NotificationBar presents status of app's internal workflow visually.
In case of server disconnection... or receiving a new message... etc
*/
class NotificationBar: UIView{
private let messageLabel: UILabel = UILabel()
// You can change the mark as you wish, If it can be presented by Unicode text.
@CenoX
CenoX / GyungdalTopRanker.swift
Created March 28, 2018 08:14
King-God-Emperor-ChungMuGong-Majesti-General-Development Master God GyungDal
enum Rank {
case top
case mid
case low
func whoIsHim() -> String {
if self == .top { return "GyungDal" }
return "I don't know"
}
}
@yannickl
yannickl / YLColor.swift
Last active September 16, 2023 03:55
Hex string <=> UIColor conversion in Swift
import Foundation
import UIKit
extension UIColor {
convenience init(hexString:String) {
let hexString:NSString = hexString.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
let scanner = NSScanner(string: hexString)
if (hexString.hasPrefix("#")) {
scanner.scanLocation = 1
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: