Skip to content

Instantly share code, notes, and snippets.

View yas375's full-sized avatar

Victor Ilyukevich yas375

  • Walmart Global Tech
  • Seattle, WA
  • 01:55 (UTC -07:00)
View GitHub Profile
@yas375
yas375 / gist:3071048
Created July 8, 2012 14:06
script for image renaming
i = 0
Dir.new(".").each do |x|
if x != '.' && x != '..'
if File.extname(x) == '.JPG'
File.rename(x, "image#{i}.jpg")
i += 1
end
end
end
@yas375
yas375 / 0.5.1
Created May 24, 2012 06:08
CocoaLumberjack.podspec for head version of cocoapods. +extensions
Pod::Spec.new do |s|
s.name = 'CocoaLumberjack'
s.version = '1.3.3'
s.license = 'BSD'
s.summary = 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.'
s.homepage = 'https://github.com/robbiehanson/CocoaLumberjack'
s.author = { 'Robbie Hanson' => 'robbiehanson@deusty.com' }
s.source = { :git => 'https://github.com/robbiehanson/CocoaLumberjack.git',
:tag => '1.3.3' }
Pod::Spec.new do |s|
s.name = 'ZBarSDK'
s.version = '1.2.2'
s.platform = :ios
s.license = 'GNU LGPL 2.1'
s.summary = 'QR and barcode scan library'
s.homepage = 'http://zbar.sourceforge.net/'
s.author = { 'Jeff Brown' => 'spadix@users.sourceforge.net' }
s.source = { :hg => 'http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar', :revision => 'iPhoneSDK-1.2.2' }
Pod::Spec.new do |spec|
spec.name = 'DTCoreText'
spec.version = '1.0.0'
spec.platform = :ios
spec.license = 'BSD'
spec.source = { :git => 'https://github.com/Cocoanetics/DTCoreText.git', :commit => '184ef084f8dd2e734016ce10733b5764360e52d8' }
spec.source_files = 'Core/Source/*.{h,m,c}'
spec.clean_paths = 'Core/Test/', 'Core/DTCoreText-Info.plist', 'Core/DTCoreText-Prefix.pch', 'DTCoreText.xcodeproj/', 'Demo/', '.gitignore'
spec.frameworks = 'MediaPlayer', 'QuartzCore', 'CoreText', 'CoreGraphics', 'ImageIO'
spec.requires_arc = true
Pod::ProjectIntegration
- creates a workspace with a name matching the project
- adds the project being integrated to the workspace
- adds the Pods project to the workspace
- adds the Pods xcconfig file to the project
- sets the Pods xcconfig as the base config for each build configuration
- adds a reference to the libPods static library
- adds the libPods static library to the "Link binary with libraries" build phase of each target
- adds a Copy Pods Resources build phase to each target
@yas375
yas375 / ruby-1.9.2-p180 (RVM)
Created March 18, 2012 09:13
Failing tests
[!] Install the required dependencies to generate documentation: $ bundle install
[!] Install the required dependencies to generate documentation: $ bundle install
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... yes
checking for CoreFoundation/CoreFoundation.h... yes
checking for CoreFoundation/CFStream.h... yes
checking for CoreFoundation/CFPropertyList.h... yes
checking for ruby/st.h... yes
creating extconf.h
creating Makefile
@yas375
yas375 / NSMutableDictionary+Utils.h
Created January 26, 2012 13:37
Добавление метода "renameKey:to:" к NSMutableDisctionary и тесты для него при помощи kiwi
#import <Foundation/Foundation.h>
@interface NSMutableDictionary (Utils)
- (void)renameKey:(NSString *)oldKeyName to:(NSString *)newKeyName;
@end
@yas375
yas375 / VTBFormTests.h
Created January 26, 2012 12:30
A little unit test example
#import <SenTestingKit/SenTestingKit.h>
@class VTBForm;
@interface VTBFormTests : SenTestCase
@property (nonatomic, retain) VTBForm *screenForm;
@end
@yas375
yas375 / gist:1682162
Created January 26, 2012 10:34
example of using UIAutomation with tuneup_js
test("Initial screen", function(target, app) {
// check navigation bar
navBar = mainWindow.navigationBar();
assertEquals("Add Account", navBar.name());
button = navBar.leftButton();
assertEquals("Back", button.name());
// check tables
table = mainWindow.tableViews()[0];
tableGroup = table.groups()[0];
@yas375
yas375 / TestCode.m
Created January 6, 2012 09:48
test `isEqual:`, `isEqualToArray:`, `==`
NSString *string1 = @"first string";
NSString *string2 = @"second string";
NSArray *array1 = [NSArray arrayWithObjects:string1, string2, nil];
NSArray *array2 = [NSArray arrayWithObjects:string1, string2, nil];
NSLog(@"(array1 == array2) => %d \n [array1 isEqualToArray:array2] => %d \n [array1 isEqual:array2] => %d",
(array1 == array2),
[array1 isEqualToArray:array2],
[array1 isEqual:array2]);