This file contains 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
# $file = path to file; | |
# $name = ( name to search (actually, it is a regex) ) | |
# EncryptedCoreData: | |
# - :commit: 5044489e622143d6efdb69fbbc383748618b5fe4 | |
# + :commit: 4ca0977e9e0b610e6813886276bb7bbd9406335f | |
# | |
# | |
# Pod revision. | |
git log -p -- FILE | perl -lne '$name = 'PODNAM'; (/^\s+$name[\w-]*:\s*$/ .. /^\+\s+:commit:/) and print' |
This file contains 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
# find ./AirkeyObjC -name '*.xcworkspace' | grep -v 'xcworkspace/' | grep -v 'xcodeproj' | perl -ln -MFile::Spec -MFile::Basename -e 'chomp; $old = $_; $_ = basename($_); $old = File::Spec->rel2abs($old); $new = File::Spec->rel2abs(qq(./AirkeyObjCProjects/$_)); $t = qx(ln -s $old $new); print $t;' | |
use File::Spec; | |
use File::Basename; | |
sub findInDirectory { | |
my $directory = shift; | |
[qx(find ./$directory -name '*.xcworkspace' | grep -v 'xcworkspace/' | grep -v 'xcodeproj')]; | |
} | |
sub copyProjects { |
This file contains 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
ls ./AppIcon.appiconset/*.png | perl -MFile::Basename -ne 'chomp; ($b, $d, $f) = fileparse($_, qr/\.[^.]*/); $s = qx(convert -channel G -separate ${_} ./AppIconPublicBeta.appiconset/${b}.png); print "$s"; print "\n";' | |
http://www.imagemagick.org/Usage/color_basics/#separate |
This file contains 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
class A | |
def relativePath(path) | |
self.relativePath(path,self.path) | |
end | |
def self.relativePath(path,to_path) | |
Pathname.new(path).relative_path_from(Pathname.new(to_path)) | |
end | |
end |
This file contains 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
class A | |
def needToCallAsInstanceAndClass# or no arguments | |
self.class.needToCallAsInstanceAndClass(self.getArgs) | |
end | |
def self.needToCallAsInstanceAndClass(*args) | |
# wowowow | |
# implementation here | |
end | |
end |
This file contains 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
# gem 'xcodeproj' | |
# native_target.rb | |
# @return [String] the name of the build product. | |
# | |
attribute :product_name, String | |
This file contains 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
class A | |
cattr_reader( | |
:dictionary | |
) | |
@@dictionary = {} | |
end | |
class B < A |
This file contains 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
attr_accessor( | |
:path, | |
:name | |
) | |
def initialize(path,name) | |
self.path = path | |
if name | |
@name = name | |
end |
This file contains 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
Project/Helpers/Helpers.rb | |
Component/ComponentModule.rb | |
Component/ComponentParts/FirstPart.rb | |
Component/ComponentParts/SecondPart.rb | |
# how to solve dependency: SecondPart.rb use Helpers.rb ( module NecessaryHelp ) ?) |
This file contains 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
self.images = | |
images | |
.select{ | |
|image| | |
image.kind_of?(ImageClass) | |
} | |
.map{ | |
|image| | |
self.generate_image_object_from_image | |
} |