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
#!/bin/bash | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |
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
-(void)testGroupAndSemaphore{ | |
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
dispatch_group_t group = dispatch_group_create(); | |
dispatch_semaphore_t sem1 = dispatch_semaphore_create(0); | |
dispatch_semaphore_t sem2 = dispatch_semaphore_create(0); | |
dispatch_semaphore_t sem3 = dispatch_semaphore_create(0); | |
dispatch_group_async(group, queue, ^{ | |
[self methodWithABlock:^{ |
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 / -name "svndata" //查找svndata的文件 |
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
/** | |
* $Revision: 4005 $ | |
* $Date: 2006-06-16 08:58:27 -0700 (Fri, 16 Jun 2006) $ | |
* | |
* Copyright (C) 2005-2008 Jive Software. All rights reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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
#! /bin/sh | |
lsof -n -i4TCP:$1 | grep LISTEN | |
pid=`lsof -n -i4TCP:$1 | grep LISTEN | awk '{print $2}'` | |
if [ $pid ] | |
then | |
kill -9 $pid | |
echo "[`date "+%Y-%m-%d %H:%M:%S"`] Process kill successfull!" | |
else | |
echo "[`date "+%Y-%m-%d %H:%M:%S"`] No process exists on port $1." |
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
cdd () { | |
repo_folder="/Work/Development" | |
test=`find $repo_folder/* -maxdepth 0 -type d | grep -i "$1" -m 1` | |
if [ ! $1 ] || [ ! $test ]; then | |
cd $repo_folder | |
else | |
cd $test | |
fi | |
} |
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
@interface UIImage (fixOrientation) | |
- (UIImage *)fixOrientation; | |
@end |