- Go to Tools > New Plugin
- Paste timestamp.py contents and save in User as timestamp.py
- Open Preferences > Key Bindings - User (or Default, your call)
- Paste keybindings.json, or add a line to your keybindings
- Customize the keyboard shortcut to your liking and save
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NSFileManager (DoNotBackup) | |
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NBResponderChainUtilities.h | |
// | |
// Created by Nicolas @ bou.io on 19/04/13. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIView (NBResponderChainUtilities) | |
- (UIView*) nb_firstResponder; // Recurse into subviews to find one that responds YES to -isFirstResponder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osascript -e 'tell application "iOS Simulator" to quit' | |
osascript -e 'tell application "Simulator" to quit' | |
xcrun simctl erase all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The 6 ways to uwnrap optionals in Swift 2.0 | |
// | |
// Created by Patrick Lynch on 6/28/15. | |
// Copyright © 2015 Patrick Lynch. All rights reserved. | |
import Foundation | |
// 1. Force Unwrapping | |
// 2. Optional Binding | |
// 3. Optional Chaining |
- Login to https://web.telegram.org
- Copy-paste contents of
telegram-scripts.js
into JS console - Run
showContacts()
to get the list of contacts with ids - Run
saveChat(userId)
whereuserId
is the id from step 3
Process can take a while, check console for progress. Occasionall FLOOD_WAIT
errors are expected. Once done, browser will download the JSON file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIView { | |
/* Usage Example | |
* bgView.addBottomRoundedEdge(desiredCurve: 1.5) | |
*/ | |
func addBottomRoundedEdge(desiredCurve: CGFloat?) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
/// ------------------------------------------------------------------- | |
private func example1() { | |
let queue = DispatchQueue.global(qos: DispatchQoS.QoSClass.default) | |
for i in 0..<10 { | |
queue.async() { | |
print("Start: \(i)") | |
sleep(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NoteExtensionsTests.swift | |
// NoteTests | |
// | |
// Created by Roman Brovko on 6/18/19. | |
// Copyright © 2019 Roman Brovko. All rights reserved. | |
// | |
import XCTest | |
@testable import Note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Parameters | |
source="$(pwd)/$1" # Track folder source where diffs are checked | |
index=$2 # Track diff remote | |
project_root=${0%/*} # Track project root folder | |
swiftlint_path='Pods/SwiftLint/swiftlint' # Track SwiftLint path | |
# Parameter check | |
if [[ $# < 1 ]]; then |
OlderNewer