I hereby claim:
- I am marclove on github.
- I am marclove (https://keybase.io/marclove) on keybase.
- I have a public key ASCJPCH0w-Y-zetl_ke0CIXKYu58YpR4xLCz1sEB-53Bfwo
To claim this, I am signing this object:
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) | |
| docker rmi -f $(docker images -q) | |
| docker-compose build | |
| docker-compose up -d |
| extension Date { | |
| func add(_ value: Int, _ component: Calendar.Component) -> Date! { | |
| let calendar = Calendar.current | |
| return calendar.date(byAdding: component, value: value, to: self) | |
| } | |
| func subtract(_ value: Int, _ component: Calendar.Component) -> Date! { | |
| let calendar = Calendar.current | |
| return calendar.date(byAdding: component, value: -value, to: self) | |
| } |
| struct Platform { | |
| static let isSimulator: Bool = { | |
| var isSim = false | |
| #if arch(i386) || arch(x86_64) | |
| isSim = true | |
| #endif | |
| return isSim | |
| }() | |
| } |
| // iOS 10.2 APPEARANCE PROXY METHODS | |
| // Generated thanks to Matt's gist: https://gist.github.com/mattt/5135521 | |
| // UIActivityIndicatorView | |
| // ========================== | |
| @property (nullable, readwrite, nonatomic, strong) UIColor *color NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; | |
| // UIBarButtonItem | |
| // ========================== | |
| (void)setBackgroundImage:(nullable UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; |
| require 'active_support' | |
| def parse_time(time_string, zone) | |
| old_tz = Time.zone | |
| begin | |
| Time.zone = zone | |
| Time.zone.parse(time_string) | |
| ensure | |
| Time.zone = old_tz | |
| end |
I hereby claim:
To claim this, I am signing this object:
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>| git=$(sh /etc/profile; which git) | |
| latest_tag=$("$git" describe --tags --always --abbrev=0) | |
| version_string="${git_release_version#*v}" # assumes the following tag format: v1.2.3 | |
| number_of_commits=$("$git" rev-list <$$$$$$-YOUR DEVELOPMENT BRANCH NAME HERE-$$$$$$> | wc -l | tr -d ' ') | |
| target_plist="$TARGET_BUILD_DIR/$INFOPLIST_PATH" | |
| dsym_plist="$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Info.plist" | |
| for plist in "$target_plist" "$dsym_plist"; do | |
| if [ -f "$plist" ]; then | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $number_of_commits" "$plist" |
| class CommentsController | |
| def create | |
| comment = Comment.new(params[:comment]) | |
| @comment = CommentCreator.new(comment).create! | |
| respond_with @comment | |
| end | |
| end | |
| class CommentCreator | |
| def initialize(comment) |
| class CommentCreator | |
| #... | |
| def perform | |
| ThreadParticipantsNotifier.new(@comment).notify | |
| CommentReplyNotifier.new(@comment).notify | |
| Kissmetrics.record(comment.author, 'Added Comment') | |
| end | |
| end |