Skip to content

Instantly share code, notes, and snippets.

View riosc's full-sized avatar

Carlos David Rios Vertel riosc

  • Santiago, Chile.
View GitHub Profile
@riosc
riosc / undoing-changes-git
Created December 7, 2012 22:44
undoing stageg changes and modified files in git
git reset --hard # removes staged and working directory changes
git clean -f -d # remove untracked files
git clean -f -x -d # CAUTION: as above but removes ignored files like config.
@riosc
riosc / gist:4539602
Created January 15, 2013 15:49
How to Empty Caches and Clean All Targets Xcode
http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually. Remove all its contents because there's a bug where Xcode will run an old version of your project that's in there somewhere. (Xcode 4.2 will show you the Derived Data folder: choose Window > Organizer and switch to the Projects tab. Click the right-arrow to the right of the Derived Data folder name.)
In the simulator, choose iOS Simulator > Reset Content and Settings.
Finally, for completeness, you can delete the contents of /var/folders; some caching happens there too.
@riosc
riosc / squash commits
Created January 25, 2013 23:06
Squash several Git commits into a single commit
https://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit
@riosc
riosc / current language ios
Created January 29, 2013 15:17
selected languague in ios
http://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios
@riosc
riosc / loadViewStyleMethods
Created January 31, 2013 23:07
load view style methods
- (void) loadView{
[super loadView];
[self initOulets:[self view]];
[self customizeSubviews];
}
@riosc
riosc / load javaScrip UIWebView
Created February 7, 2013 16:13
load javaScript in UIWebView IOS
http://www.altinkonline.nl/tutorials/xcode/uiwebview/load-jquery-in-uiwebview/
@riosc
riosc / url paratheres javascript
Created February 7, 2013 19:04
paramether by url with javascript
http://www.xul.fr/javascript/parameters.html
@riosc
riosc / not dissmiss popover
Created February 14, 2013 20:09
avoid dissmiss popover on tap
//BLOCKING DISSMISS POPOVER CLIKING OVER TAP WINDOW
//navPlaqueDetail.modalInPopover = YES;
//navPlaqueDetail.modalPresentationStyle = UIModalPresentationCurrentContext;
@riosc
riosc / commit_modified_files_gitHub
Created February 18, 2013 14:56
know what commit modified a file in gut hub
http://stackoverflow.com/questions/4784575/how-do-i-find-the-most-recent-git-commit-that-modified-a-file
@riosc
riosc / enum_in_c
Last active December 14, 2015 05:39
enum c tutorial
http://crasseux.com/books/ctutorial/enum.html
typedef NS_OPTIONS(NSUInteger, ComponentOptions){
ComponentOptionA = 0,
ComponentOptionB = 1 << 0,
ComponentOptionC = 1 << 1,
ComponentOptionD = 1 << 2,
ComponentOptionE = 1 << 3,
ComponentOptionF = 1 << 4,