Skip to content

Instantly share code, notes, and snippets.

View kos9kus's full-sized avatar
😶‍🌫️
Always coding

Kos kos9kus

😶‍🌫️
Always coding
View GitHub Profile
@kos9kus
kos9kus / gist:126150686b8cbc6ac338d54b851bb97a
Last active June 27, 2019 09:27
Shortcut for sublime text to indent JSON format
[
{
"keys": ["alt+shift+j"], "command": "set_syntax",
"args": {"syntax": "Packages/Javascript/JSON.tmLanguage"}
}
]
// public func save() {
// let appDirs = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
// guard let libraryDirectory = appDirs.first else {
// return
// }
// let files = (try? obtainDBFolderURL())?.path ?? ""
// let swiftArray = try? FileManager.default.contentsOfDirectory(atPath: files)
// swiftArray?.forEach({ path in
// if let urlComponents = URL(fileURLWithPath: path).pathComponents.last {
// let p = libraryDirectory + "/" + urlComponents