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
def credentials_string | |
str = '' | |
str << " --username #{shell_quote(@login)}" unless @login.blank? | |
str << " --password #{shell_quote(@password)}" unless @login.blank? || @password.blank? | |
str << " --trust-server-cert --no-auth-cache --non-interactive" | |
str | |
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
- (IBAction)showpopup:(id)sender { | |
zoomview.hidden=NO; | |
[self.view addSubview:zoomview]; | |
zoomview.frame = CGRectMake(0,0,0,0); // wherever | |
zoomview.transform = CGAffineTransformMakeScale(0.5,0.5); | |
[UIView animateWithDuration:0.9 animations:^{ | |
zoomview.transform = CGAffineTransformMakeScale(1,1); | |
} completion:^(BOOL finished) { | |
}]; |
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
UIImage *myImage = [UIImage imageNamed:@"some_image"]; | |
CIContext *context = [CIContext contextWithOptions:nil]; | |
CIImage *inputImage = [CIImage imageWithCGImage:myImage.CGImage]; | |
CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"]; | |
[filter setValue:inputImage forKey:kCIInputImageKey]; | |
[filter setValue:@8.f forKey:@"inputRadius"]; // Default Value is 10.f | |
CIImage *result = [filter valueForKey:kCIOutputImageKey]; | |
CGImageRef cgImage = [context createCGImage:result fromRect:[inputImage extent]]; |
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
# | |
# Terminal Notification! | |
# if you don't have terminal-notifier command line tool, | |
# >brew install terminal-notifier | |
# | |
API_TOKEN="API_TOKEN" | |
TEAM_TOKEN="TEAM_TOKEN" | |
SIGNING_IDENTITY="iPhone Distribution: ..." | |
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/...mobileprovision" |
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
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
export TERM="xterm-color" | |
export GREP_OPTIONS='--color=auto' | |
TITLEBAR='\[\e]0;\u@\h:\w \a\]' | |
alias ls="ls -v" | |
alias ll="ls -alv" |
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
cd $SRCROOT | |
/usr/local/opt/ruby/bin/pod | |
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
#Update build number with number of git commits if in release mode | |
if [ ${CONFIGURATION} == "Release" ]; then | |
buildNumber=$(git rev-list HEAD | wc -l | tr -d ' ') | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" | |
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
set nocompatible " 오리지날 VI와 호환하지 않음 | |
set autoindent " 자동 들여쓰기 | |
set cindent " C 프로그래밍용 자동 들여쓰기 | |
set smartindent " 스마트한 들여쓰기 | |
set wrap | |
set nowrapscan " 검색할 때 문서의 끝에서 처음으로 안돌아감 | |
set nobackup " 백업 파일을 안만듬 | |
set visualbell " 키를 잘못눌렀을 때 화면 프레시 | |
set ruler " 화면 우측 하단에 현재 커서의 위치(줄,칸) 표시 | |
set shiftwidth=4 " 자동 들여쓰기 4칸 |
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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
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
#import <CommonCrypto/CommonDigest.h> | |
+ (NSString*)sha256HashFor:(NSString*)input | |
{ | |
const char* str = [input UTF8String]; | |
unsigned char result[CC_SHA256_DIGEST_LENGTH]; | |
CC_SHA256(str, (unsigned int)strlen(str), result); | |
NSMutableString *ret = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH*2]; | |
for(int i = 0; i<CC_SHA256_DIGEST_LENGTH; i++) |
OlderNewer