In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| function Person(name) { | |
| this.name = name; | |
| } | |
| var john = new Person('John'); | |
| // implicit done by node.js: | |
| // exports = module.exports | |
| exports.myperson = john; | |
| // test = require('./lib/test'); |
| //To initialize a view controller with a nib file you use initWithNibName. | |
| UIViewController *viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; | |
| //Using Storyboard instead of nib files, use the UIStoryboard class | |
| UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MyStoryboard" bundle:nil]; | |
| UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"ViewController"]; |
An index-title-scrubber-bar, for use with a
UICollectionView(or even aPSTCollectionView). Gives a collection view the index title bar for-sectionIndexTitlesthat aUITableViewgets for (almost) free. A huge thank you to @Yang from [this Stack Overflow post][so], which saved my bacon here.
When you're using a UITableView and you define the UITableViewDataSource method -sectionIndexTitlesForTableView:, you get a sweet right-hand-side view for scrubbing through a long table view of fields, separated by sections. The titles are the names of the sections, by default (or at least letters based on the section names).
| using UnityEngine; | |
| using System.Collections; | |
| using UnityEditor; | |
| using UnityEditor.Callbacks; | |
| using System.IO; | |
| public class PostprocessBuildPlayer : ScriptableObject { | |
| [PostProcessBuild] | |
| static void OnPostprocessBuildPlayer(BuildTarget target, string buildPath) { |
| #!/bin/bash | |
| # NB: next line assumes that this script is in the root | |
| # of your Settings.bundle directory. Feel free to adapt | |
| # accordingly. | |
| base_dir=$(dirname $0) | |
| for plist in *.plist; do | |
| # Generate the name of the matching .strings file | |
| outfile=en.lproj/${plist%.*}.strings |
| /* | |
| File: KeychainItemWrapper.h | |
| Abstract: | |
| Objective-C wrapper for accessing a single keychain item. | |
| Version: 1.2 - ARCified | |
| Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
| Inc. ("Apple") in consideration of your agreement to the following | |
| terms, and your use, installation, modification or redistribution of |
| # vi: ft=dosini | |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = [email protected] | |
| username = pksunkara | |
| [core] | |
| editor = nvim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| pager = delta | |
| [column] |