Skip to content

Instantly share code, notes, and snippets.

View sauvikdolui's full-sized avatar

Sauvik Dolui sauvikdolui

View GitHub Profile

Undoing chages in git

AMENDMENT (git commit --amend)

  • Fix typo in last commit message
git commit --amemd -m 'Your new commit message
  • Add more changes
// Basic Usages
Log.d("This is a DEBUG message") // DEBUG log
Log.e("This is an ERROR message") // ERROR log
Log.i("This is a INFO message") // INFO log
Log.v("This is a VERBOSE message") // VERBOSE log
Log.w("This is a WARNING message") // WARNING log
Log.s("This is a SEVERE message") // SEVERE Error log
// Log on Xcode Console
2018-06-09 01:03:37694 [💬][AppDelegate.swift]:20 15 application(_:didFinishLaunchingWithOptions:) -> This is a DEBUG message
[{
"id": "4kQA1aQK8-Y",
"created_at": "2016-05-29T15:42:02-04:00",
"width": 2448,
"height": 1836,
"color": "#060607",
"likes": 12,
"liked_by_user": false,
"user": {
"id": "OevW4fja2No",
@sauvikdolui
sauvikdolui / StateManagement.swift
Last active November 5, 2017 16:05
Medium Blog Post SDStateTableView state mangement
// MARK: IBActions
extension ViewController {
@IBAction func dataAvailableButtonTapped(_ sender: UIButton) {
stateTableView.setState(.dataAvailable)
}
@IBAction func noDataAvailableButtonTapped(_ sender: UIButton) {
stateTableView.setState(.withImage(image: "empty_cart",
title: "EMPTY CART",
message: "Please add some item in your cart first"))