https://github.com/allmarkedup/purl, A JS utility for for parsing URLs and extracting information out of them.
https://github.com/zacharyvoase/urlobject, Python library for manipulating URLs (and some URIs) in a more natural way.
https://github.com/allmarkedup/purl, A JS utility for for parsing URLs and extracting information out of them.
https://github.com/zacharyvoase/urlobject, Python library for manipulating URLs (and some URIs) in a more natural way.
| /** | |
| * Returns the human-readable string that represents the specified seconds. | |
| * @discussion Ex: seconds = 4017 -> "01:06:57" | |
| */ | |
| - (NSString *)timeStringFromSeconds:(NSInteger)seconds | |
| { | |
| int hours = seconds / 3600; | |
| int rem = seconds % 3600; | |
| int minutes = rem / 60; | |
| int remSecs = rem % 60; |
| # links the Xcode4.6.x 6.1 SDK to Xcode5 sdks | |
| # by C. Bess (2013) | |
| # For simulators run (ex: iOS 6 sdk/app in iOS 7 simulator): | |
| # - Works if you haven't installed iOS 6 sdk yet | |
| # ln -s Xcode-4.6.3.app/.../iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk Xcode.app/.../iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk | |
| echo Linking iOS 6 SDK to Xcode 5 | |
| # name of the Xcode bundles (in Applications) |
| #!/usr/bin/python | |
| # Created by C. Bess (2013) | |
| # Converts the frame dot notation to CGGeometry function calls | |
| # | |
| # ref: http://manual.macromates.com/en/environment_variables.html | |
| # | |
| # Usage: | |
| # After selecting the text that contains the target text, use | |
| # 'Select Bundle Item' menu item, then find this command and press enter |
| // adjust the label height (top align text) | |
| // old | |
| CGSize labelSize = [model.name sizeWithFont:self.nameLabel.font | |
| constrainedToSize:_maxNameLabelSize | |
| lineBreakMode:self.nameLabel.lineBreakMode]; | |
| // new | |
| CGSize labelSize = [model.name boundingRectWithSize:_maxNameLabelSize | |
| options:NSStringDrawingUsesLineFragmentOrigin | |
| attributes:@{NSFontAttributeName: self.nameLabel.font} | |
| context:nil].size; |
| #!/bin/bash | |
| # debian count.ly install script | |
| # by: C. Bess (github.com/cbess), 2013 | |
| # Tested on wheezy (v7.1) | |
| set -e | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "Please execute Countly installation script with a superuser..." 1>&2 | |
| exit 1 |
| echo Process pods | |
| if [ ! -e /usr/bin/pod ] ; then | |
| echo Installing cocoapods... | |
| gem install cocoapods | |
| fi | |
| pod update |