Skip to content

Instantly share code, notes, and snippets.

View bananafish911's full-sized avatar
👽

Victor Do. bananafish911

👽
View GitHub Profile
@bananafish911
bananafish911 / disable_all_animation.sh
Created June 17, 2021 11:30 — forked from lexrus/disable_all_animation.sh
Disable all animations of OS X.
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work
defaults write -g NSWindowResizeTime -float 0.001
@bananafish911
bananafish911 / gist:90adc7e379fa804305ca2a57cd5b03e4
Created June 7, 2021 08:07 — forked from shinyzhu/gist:3175082
UIColor from hex value in Objective-C
/*
UIColor from hex value in Objective-C
*/
#define UIColorFromRGB(rgbHex) [UIColor colorWithRed:((float)((rgbHex & 0xFF0000) >> 16))/255.0 green:((float)((rgbHex & 0xFF00) >> 8))/255.0 blue:((float)(rgbHex & 0xFF))/255.0 alpha:1.0]
// Usage:
UIColor *bgColor = UIColorFromRGB(0xCCEEFF);
@bananafish911
bananafish911 / SnapshotHelper.h
Created February 21, 2020 15:09 — forked from vovkasm/SnapshotHelper.h
Objective C implementation of SnapshotHelper class for Fastline Snapshot tool (https://github.com/fastlane/fastlane/tree/master/snapshot).
/* This SnapshotHelper class should be compatible with SnapshotHelper.swift version 1.2 */
@import Foundation;
@import XCTest;
@interface SnapshotHelper : NSObject
- (instancetype)initWithApp:(XCUIApplication*)app;
- (void)snapshot:(NSString*)name waitForLoadingIndicator:(BOOL)wait;
@bananafish911
bananafish911 / LocalizeStringsFromAndroid.rb
Created June 20, 2017 12:40 — forked from ebaker355/LocalizeStringsFromAndroid.rb
Translate Android strings.xml files to iOS Localizable.strings files
#!/usr/bin/env ruby
# gist: https://gist.github.com/3217498
# This script can be called from an Xcode 'Run Script' build phase at the
# beginning of the build process, like this:
#
# ${PROJECT_DIR}/LocalizeStringsFromAndroid.rb ${PROJECT_NAME}
#
# This script should be placed in the same directory as your .xcodeproj