A collection of links to the "Master the JavaScript Interview" series of medium stories by Eric Elliott.
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}'
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
Lesson 1 - Iterations | |
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/ | |
Lesson 2 - Arrays | |
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/ | |
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/ | |
Lesson 3 - Time Complexity | |
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/ | |
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/ |
const name = 'Github Gist'; | |
console.log(`Hello ${name}`); |
A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.
/** | |
* Gets the seat number of the develper to get the last sweet | |
* of some sweets distributed as a treat to developers. The last sweet | |
* happens to taste AWFUL. | |
* | |
* @param n Number of developers | |
* @param m Number of sweets | |
* @param s Chair number to begin passing out sweets | |
* | |
* @returns Seat number of the developer to be warned |
import Foundation | |
// MARK: - VARIABLES | |
/* | |
Variables are data stored that can have their value change whenever we want it and | |
constant are value that can not be changed. | |
The advantage of using var in declaring a variable and let in declaring a constant is that | |
it help xcode to remind us of the constant we have set and whenever we try to change it, |
I've been working through the exercises in the excellent iOS Unit Testing by Example book by Jon Reid, which I highly recommend. However, the book is in beta at the moment and there are some curveballs thrown by iOS 13 that aren't handled in the text yet. Specifically, when I hit the section about using a testing AppDelegate
class I thought "This is very good. But what about the SceneDelegate
?"
In Chapter 4 the recommendation is to remove the @UIApplicationMain
decoration and make a manual top-level call to UIApplicationMain
. To wit:
import UIKit
enum HTTPMethod: String { | |
case delete = "DELETE" | |
case get = "GET" | |
case patch = "PATCH" | |
case post = "POST" | |
case put = "PUT" | |
} | |
enum HTTPScheme: String { | |
case http |