Skip to content

Instantly share code, notes, and snippets.

@ygit
ygit / Local_Podfile
Created April 24, 2019 12:15
Point to local Podspecs repo instead of Master/Trunk Podspecs
platform :ios, '9.0'
workspace '../WebEngageAll'
source 'https://github.com/WebEngage/podspecs.git'
# source 'https://github.com/CocoaPods/Specs.git'
def app_pods
pod 'WebEngage' #:path => '../Built'
@ygit
ygit / XcrunDemangleScript.sh
Created May 11, 2019 20:33
A xcrun bash script to demangle symbols
FILE=$1
ANOTHER_FILE=$2
exec 4> "$ANOTHER_FILE"
while read -ru 3 LINE; do
line="$LINE"
linearray=($line)
echo ${linearray[2]}
xcrun c++filt "${linearray[2]}" >&4
rm -rf ~/Library/Developer/Xcode/DerivedData/*
@ygit
ygit / gist:ff8b591b7373ba740a04
Created November 3, 2015 08:18
Get Average Color of UIImage
- (UIColor *)getAverageColor:(UIImage *)image{
CGSize size = {1, 1};
UIGraphicsBeginImageContext(size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetInterpolationQuality(ctx, kCGInterpolationMedium);
[image drawInRect:(CGRect){.size = size} blendMode:kCGBlendModeCopy alpha:1];
uint8_t *data = CGBitmapContextGetData(ctx);
UIColor *color = [UIColor colorWithRed:data[2] / 255.0f
green:data[1] / 255.0f
@ygit
ygit / config.fish
Last active February 25, 2021 16:32
Fish Terminal alias & config file
alias clean='rm -rf ~/Library/Developer/Xcode/DerivedData/'
alias fast='bundle exec fastlane'
alias cl='curl -L'
alias ll='ls -l'
alias ..='cd ..'
alias please='sudo'
alias now='date +"%T"'
alias welcome='sh -x ~/welcome.sh'
status --is-interactive; and source (rbenv init -|psub)
source ~/.bash_profile
@ygit
ygit / VSCodeSettingsSync.txt
Last active December 22, 2021 16:09
VS Code Settings
VS Code Settings
Run >
`code --list-extensions | xargs -L 1 echo code --install-extension`
Output >
code --install-extension 343max.android-emulator-launcher
code --install-extension adelphes.android-dev-ext
code --install-extension alexisvt.flutter-snippets
@ygit
ygit / SkipVerification.txt
Last active March 29, 2024 08:27
Skip Verification of Mac Apps
xattr -d com.apple.quarantine /path/to/app/myMacApp.app