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
# generate ctags for rails project | |
ctags -R --exclude=.git --exclude=log * --exclude=coverage |
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
# initialize remote repositories for gitosis | |
su git | |
cd ~/repositories | |
mkdir SpringJMS.git | |
cd SpringJMS.git | |
git --bare init |
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
wget http://www.fayea.com/apache-mirror//commons/net/binaries/commons-net-3.1-bin.zip | |
unzip commons-net-3.1-bin.zip | |
sudo cp commons-net-3.1/commons-net-3.1.jar /usr/share/ant/lib/ | |
rm -rf commons-net-3.1 | |
rm -rf commons-net-3.1-bin.zip |
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
require "net/ftp" | |
host = "ftp://192.168.1.42/" | |
begin | |
21ftp = Net::FTP.new | |
ftp.connect('192.168.1.42', 21) | |
ftp.login('***', '***') | |
status = ftp.status | |
#p status | |
files = ftp.list('*') |
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
// generate 36 length UUID | |
// from: http://stackoverflow.com/questions/8684551/generate-a-uuid-string-with-arc-enabled | |
+ (NSString *)uuidString { | |
// Returns a UUID | |
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); | |
NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); | |
CFRelease(uuid); | |
return uuidStr; |
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
@ECHO OFF | |
git config --global user.name "lvjian" | |
git config --global user.email "lvjian@dayang.com.cn" | |
echo 配置别名 | |
git config --global alias.co "checkout" | |
git config --global alias.st "status" | |
git config --global alias.ci "commit" | |
echo 配置默认编辑器 |
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
javac MainClass.java -cp "path/lib/*" | |
java -cp "path/lib/*" package.MainClass |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<project name="uploadfile" default="compile" basedir="."> | |
<property name="src.dir" value="src/java" /> | |
<property name="test.dir" value="src/test" /> | |
<property name="res.dir" value="src/resources" /> | |
<property name="bin.dir" value="bin" /> | |
<property name="lib.dir" value="libs" /> | |
<property name="doc.dir" value="doc" /> | |
<property name="classes.dir" value="${bin.dir}/classes" /> |
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
#table | |
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_window_landscape.png"]] | |
#Cell | |
UIView *backgrdView = [[UIView alloc] initWithFrame:cell.frame]; | |
backgrdView.backgroundColor = [UIColor whiteColor]; | |
cell.backgroundView = backgrdView; |
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
NSIndexPath *indexSelected = [NSIndexPath indexPathForRow:index inSection:0]; | |
[self tableView: self.taskTable willSelectRowAtIndexPath:indexSelected]; | |
[self.taskTable selectRowAtIndexPath:indexSelected | |
animated:YES | |
scrollPosition:UITableViewScrollPositionMiddle]; | |
[self tableView: self.taskTable didSelectRowAtIndexPath:indexSelected]; |