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
mogrify -path ../temp/ -resize 40% *.jpg |
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
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
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
for a in *.added; do mv $a $ | |
{a%%.added}; done |
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
postgres=# select * from pg_stat_activity; | |
select pg_terminate_backend(13514) from pg_stat_activity where datname='collab'; |
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
dwarfdump --lookup 0x00003a04 --arch armv6 myApp.app.dSYM | |
atos -arch armv7 -o 'app name.app'/'app name' 0x0003b508 |
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
git checkout --ours -- path/to/file.txt | |
git checkout --theirs -- path/to/file.txt |
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
[core] | |
excludesfile = .global_gitignore | |
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
ll = log --name-status | |
[diff "localizablestrings"] |
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
if (UIGestureRecognizerStateRecognized == gesture.state) { | |
} | |
在识别touch时忽略掉某些子view的response | |
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch | |
{ | |
if ([touch.view isDescendantOfView:loginButton]) { | |
return NO; | |
} |
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
NSArray * strings = [text componentsSeparatedByString:@"@"]; | |
if([strings count] == 2) { | |
NSString * string = [strings objectAtIndex:0]; | |
NSCharacterSet * set = [NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.-"]; | |
set = [set invertedSet]; | |
if ([string length]) { //@之前不是空字串 | |
range = [string rangeOfCharacterFromSet:set]; | |
if (NSNotFound == range.location) { //只包含合法字符 | |
string = [strings objectAtIndex:1]; | |
if ([string length]) { //@之后不是空字串 |
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
cmake_minimum_required(VERSION 2.8.11) | |
project(VtkFboInQtQuick) | |
set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
set(CMAKE_AUTOMOC ON) | |
find_package(VTK REQUIRED) | |
include(${VTK_USE_FILE}) |