1. mkdir repo
2. cd repo && git init
3. git remote add –track master origin http://your/repository.git
4. git config core.sparsecheckout true
5. echo path/ > .git/info/sparse-checkout
6. git pull
1.Make a copy of the .xib in the Finder.
2. Open the copied file in a text editor.
3. Change “com.apple.InterfaceBuilder3.CocoaTouch.XIB” to “com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB”.
4. Change all instances of “IBCocoaTouchFramework” to “IBIPadFramework”.
5. Search for sizes like {480, 320} and edit them. Or just reopen the file in Xcode and use the GUI to resize items as needed.
Add this to your {App}-prefix.pch file
#ifndef __OPTIMIZE__
# define NSLog(…) NSLog(__VA_ARGS__)
#else
# define NSLog(…) {}
#endif
__OPTIMIZE__ only be set on release of build your app.
Quit Safari
Open the Terminal
Move the folder ~/Library/Safari into your Dropbox
mv ~/Library/Safari ~/Dropbox
Make a link from the old location to the new location (for your Mac’s safari to use).
ln -s ~/Dropbox/Safari/ ~/Library/Safari
You’re done on your mac!
before you run this script, you should had ruby env and Xcode.
1. save it with name ‘png’
2. chmod +x png
useage: ./png [ipa file path]
#!/usr/bin/env ruby -wKU require 'rubygems' ipa = ARGV.first puts "useage:png" and return if !ipa or ipa.end_with?("ipa") name = File.basename(ipa, ".ipa") # create output folder in you desktop output = "#{ENV['HOME']}/Desktop/#{name}" system %Q{mkdir -p "#{output}" && unzip "#{ipa}" -u -d "#{output}"} Dir.glob(File.join(output, "**", "*.png")).each do |f| system %Q{/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -revert-iphone-optimizations -q "#{f}" "#{File.join(output ,File.basename(f))}"} end system %Q{find '#{output}' -type f -not \\( -iname "*.png" -or -iname "*.jpg" -or -iname "*.jpeg" \\) -delete} system %Q{open "#{output}" -a finder}
May be there is another better method to do this. If you have the better way to do it, please tell me.
BTW, below code were successful running in rails3 and ruby 1.8.7
1. first, you should add open4 gem to your Rails project Gemfile
gem 'open4'
and run “bundle install” in terminal to install it in project dir.
2. add below code to config/deploy.rb, please change the namespace name to your own
namespace :your_namespance_name do
require 'open4'
rails_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
stdin, stdout, stderr = Open4::popen4("cd #{rails_root} && rake -T")
#please replace :your_namespance_name to your own, this code to grap you special of namespance rake tasks
stderr.read.scan(/your_namespance_name\:(\w+)/).each do |match|
desc "rake task named '#{match.last}'"
task match.last.to_sym, :roles => :app do
run "cd #{current_path}; RAILS_ENV=production rake railscasts:#{match}"
end
end
end
after do that, when you run cap -T in you command shell, you will be found the tasks from rake, also, it can invoked from the remote server of you own.
CALayer *touchedLayer = [self.view layer]; // here is an example wiggle CABasicAnimation *wiggle = [CABasicAnimation animationWithKeyPath:@"transform"]; wiggle.duration = 0.1; wiggle.repeatCount = 1e100f; wiggle.autoreverses = YES; wiggle.toValue = [NSValue valueWithCATransform3D:CATransform3DRotate(touchedLayer.transform,0.1, 0.0 ,1.0 ,2.0)]; // doing the wiggle // [touchedLayer addAnimation:wiggle forKey:@"wiggle"];
put this to you ~/.inputrc
# do not show hidden files in the list set match-hidden-files off # auto complete ignoring case set show-all-if-ambiguous on set completion-ignore-case on # lookup in search histories "\ep": history-search-backward "\e[A": history-search-backward "\e[B": history-search-forward
wget -m -erobots=off -U Mozilla -p <web site url>
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains your.website.com \
--no-parent \
http://your.website.com/
gem list | cut -d" " -f1 | xargs gem uninstall -aIx