Why? @sstephenson explains it best here.
This should get rid of the rvm dir and any installed rubies:
$ rvm implode
This should get rid of the rvm dir and any installed rubies:
$ rvm implode
| NS_INLINE NSRange NSRangeMake(NSUInteger loc, NSUInteger len) { | |
| return NSMakeRange(loc, len); | |
| } | |
| NS_INLINE NSUInteger NSRangeMax(NSRange range) { | |
| return NSMaxRange(range); | |
| } | |
| NS_INLINE BOOL NSRangeContainsLocation(NSUInteger loc, NSRange range) { | |
| return NSLocationInRange(loc, range); |
| #! /usr/bin/ruby | |
| fizzy = [1,0,0] | |
| buzzy = [1,0,0,0,0] | |
| 1.upto(100) do |i| | |
| fizzy.rotate! | |
| buzzy.rotate! | |
| str = i.to_s * (1 - (fizzy[0] | buzzy[0])) | |
| str << "Fizz" * fizzy[0] |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
Suppose we want to add support for a new iOS 8 API in our framework that replaces an older iOS 7 API. There are a few problems we might face:
These three problems require three different technical solutions:
respondsToSelector:)__IPHONE_OS_VERSION_MAX_ALLOWED macro| #!/bin/sh | |
| set -e | |
| set -x | |
| for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
| do | |
| npm -g install "$package" | |
| done |
| // | |
| // APAspectFitImageView.h | |
| // autolayout | |
| // | |
| // Created by Antol Peshkov on 16.10.14. | |
| // Copyright (c) 2014 Antol Peshkov. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> |
| """ | |
| base64's `urlsafe_b64encode` uses '=' as padding. | |
| These are not URL safe when used in URL paramaters. | |
| Functions below work around this to strip/add back in padding. | |
| See: | |
| https://docs.python.org/2/library/base64.html | |
| https://mail.python.org/pipermail/python-bugs-list/2007-February/037195.html | |
| """ |
| $ mktmpenv | |
| New python executable in tmp-f4732394b48189f9/bin/python | |
| Installing setuptools............done. | |
| Installing pip...............done. | |
| This is a temporary environment. It will be deleted when you run 'deactivate'. | |
| (tmp-f4732394b48189f9) sallah:~/.virtualenvs/tmp-f4732394b48189f9$ deactivate | |
| Removing temporary environment: tmp-f4732394b48189f9 | |
| Removing tmp-f4732394b48189f9... |