I wrote this four years ago, so instead use this command:
$ docker rmi $(docker images -q -f dangling=true)
| # Sublime Text 3 languages list: | |
| ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/ | |
| # Remove all default Sublime Text 3 snippets for Python language | |
| export ST3_LANG="Python" | |
| mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/ | |
| unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done | |
| unset ST3_LANG |
| // | |
| // API.swift | |
| // | |
| // Created by Taro Minowa on 6/10/14. | |
| // Copyright (c) 2014 Higepon Taro Minowa. All rights reserved. | |
| // | |
| import Foundation | |
| typealias JSONDictionary = Dictionary<String, AnyObject> |
| import UIKit | |
| import Security | |
| let serviceIdentifier = "com.company" | |
| let accessGroup = "com.company.app" | |
| let kSecClassValue = kSecClass as NSString | |
| let kSecAttrAccountValue = kSecAttrAccount as NSString | |
| let kSecValueDataValue = kSecValueData as NSString | |
| let kSecClassGenericPasswordValue = kSecClassGenericPassword as NSString |
| var PostsApi = require('webapi/posts'), | |
| // assuming the api object from the jsbin snippet | |
| Reflux = require('reflux'); | |
| var PostActions = createActions(["load", "loadError"]); | |
| // load action is invoked either from: | |
| // * top most component's componentDidMount | |
| // function in your application, or | |
| // * window.onLoad | |
| // I prefer the first strategy because that'll |
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
| // *** Extensions | |
| extension NSString { | |
| func dictionaryFromJson() -> NSDictionary { | |
| let jsonData = self.dataUsingEncoding( NSUTF8StringEncoding )! | |
| return jsonData.dictionary() | |
| } | |
| } | |
| extension String { | |
| func dictionaryFromJson() -> NSDictionary { | |
| let jsonData = self.dataUsingEncoding( NSUTF8StringEncoding )! |
In React's terminology, there are five core types that are important to distinguish:
React Elements
| 'use strict'; | |
| var createAsyncActions = require('./createAsyncActions') | |
| var CategoryAPI = require('../api/CategoryAPI') | |
| var CategoryActions = createAsyncActions({ | |
| create: function(category) { | |
| CategoryAPI | |
| .create(category) |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.