Skip to content

Instantly share code, notes, and snippets.

View Sorix's full-sized avatar

Vasily Ulianov Sorix

View GitHub Profile
@yamoridon
yamoridon / DataTaskPublisher.swift
Created June 10, 2019 15:16
DataTaskPublisherを作ってみた
import Foundation
import Combine
struct DataTaskSubscription: Subscription {
let task: URLSessionTask
let combineIdentifier: CombineIdentifier
func request(_ demand: Subscribers.Demand) {
}
@ainsofs
ainsofs / gist:2b80771a5582b7528d9e
Created April 16, 2015 01:50
Clear .gitignore cache
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@benjamintanweihao
benjamintanweihao / working_with_dates.swift
Created November 4, 2014 01:57
Working with Dates, Calendars in Swift.
// Playground - noun: a place where people can play
import UIKit
// Setup the calendar object
let calendar = NSCalendar.currentCalendar()
// Set up date object
let date = NSDate()
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote