Skip to content

Instantly share code, notes, and snippets.

View hvkale's full-sized avatar
Do Not Disturb

Harshad Kale hvkale

Do Not Disturb
View GitHub Profile
public protocol WithConfigurable {}
public extension WithConfigurable where Self: AnyObject {
@discardableResult
func with(block: (Self) -> Void) -> Self {
block(self)
return self
}
}
extension NSObject: WithConfigurable {}
### Keybase proof
I hereby claim:
* I am hvkale on github.
* I am hvkale (https://keybase.io/hvkale) on keybase.
* I have a public key ASBubpxmV6Vc2ErCv25I01S9J3-CHusimL1hku-30Y0_Jgo
To claim this, I am signing this object:
@hvkale
hvkale / keybase.md
Last active October 13, 2016 17:21
Verifying myself on keybase.io

Keybase proof

I hereby claim:

  • I am kalehv on github.
  • I am kalehv (https://keybase.io/kalehv) on keybase.
  • I have a public key whose fingerprint is 3FEE 6F83 6507 17F0 4F24 A770 2127 923E 0E46 E6F4

To claim this, I am signing this object:

@hvkale
hvkale / gitignore.py
Last active August 29, 2015 14:10
Python script that downloads contents of .gitignore file from https://github.com/github/gitignore for specified language / IDE. The name of the argument has to exactly match with the name on github repo. WARNING - the argument name is CASE-SENSITIVE Python 2.7
#!/usr/bin/env python
"""
gitignore.py:
This program searches for specified module on GitHub/gitignore repository.
If the file is found on github, it is downloaded and created in the current working directory.
This program creates .gitignore if it does not exist or overwrites if it does exist.
"""