This file contains hidden or 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
| NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
| NSArray *fontNames; | |
| NSInteger indFamily, indFont; | |
| for (indFamily=0; indFamily<[familyNames count]; ++indFamily) | |
| { | |
| NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]); | |
| fontNames = [[NSArray alloc] initWithArray: | |
| [UIFont fontNamesForFamilyName: | |
| [familyNames objectAtIndex:indFamily]]]; | |
| for (indFont=0; indFont<[fontNames count]; ++indFont) |
This file contains hidden or 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
| @implementation CustomViewFactory | |
| +(CustomView*)newCustomView:(NSString*)lang{ | |
| NSArray *nibs = [[NSBundle mainBundle] loadNibNamed:@"CustomView" owner:self options:nil]; | |
| CustopmView *customView; | |
| for(UIView *view in nibs){ | |
| if([view isKindOfClass:[CustomView class]]){ | |
| customView = (CustomView*)view; |
This file contains hidden or 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
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.8' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' | |
| gem 'mysql2' | |
| gem 'jquery-rails' |
This file contains hidden or 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
| defaultFont = [UIFont fontWithName:@"Bariol" size:14.0]; | |
| for(UIView *aView in [[self view] subviews]){ | |
| if([aView isKindOfClass:[UILabel class]]){ | |
| [((UILabel*)aView) setFont:defaultFont]; | |
| } | |
| } |
This file contains hidden or 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
| if [ -f `brew --prefix`/etc/bash_completion ]; then | |
| . `brew --prefix`/etc/bash_completion | |
| fi | |
| export CLICOLOR=1 | |
| export LSCOLORS=cxfxcxdxbxegedabagacad | |
| export GREP_OPTIONS='--color=auto' | |
| source "`brew --prefix`/etc/grc.bashrc" |
This file contains hidden or 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 <Foundation/Foundation.h> | |
| @interface StringHelper : NSObject | |
| + (NSString*)costString:(NSString*)source; | |
| + (NSString*)dateString:(NSString*)source; | |
| + (NSString*)dateString:(NSString*)source withTime:(BOOL)enableTime; | |
| + (NSString*)imagePathStringWithSource:(NSString*) source; | |
| + (NSString*)UTF8DecodedString:(NSString*)source; | |
| + (NSString*)UTF8EncodedString:(NSString*)source; |
This file contains hidden or 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
| def appropriate_visibilities | |
| unless (self.visibilities - self.user.roles).empty? | |
| errors.add(:visibilities, "invalid visibilities assignment") | |
| end | |
| # Below is a bad one, change the visibilities silently. this is not a right behavior of validation | |
| # self[:visibilities] = BIT_MASKER.mask( | |
| # # This is assuming that self.visibilities, at least, must have :regular as its member | |
| # # or we will end up getting visibilities = []. | |
| # # See the comment on visibilities() above |
This file contains hidden or 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 "RoundedTextField.h" | |
| @implementation RoundedTextField | |
| - (id)initWithFrame:(CGRect)frame | |
| { | |
| self = [super initWithFrame:frame]; | |
| if (self) { | |
| } | |
This file contains hidden or 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
| if defined?(Rails) && Rails.env | |
| extend Rails::ConsoleMethods | |
| end |
This file contains hidden or 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
| require 'hirb' | |
| require 'pry' | |
| ActiveSupport.on_load :active_record do | |
| Hirb::Formatter.dynamic_config['ActiveRecord::Base'] | |
| Hirb.enable | |
| old_print = Pry.config.print | |
| Pry.config.print = proc do |output, value| | |
| Hirb::View.view_or_page_output(value) || old_print.call(output, value) | |
| end |