This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="checkbox-input"> | |
| <input class="checkbox-input__input" id="card-default" name="card-default" type="checkbox" ng-model="creditCard.default"> | |
| <label class="checkbox-input__label" for="card-default">Make this my default card</label> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .checkbox-input | |
| display: block | |
| position: relative | |
| background-color: rgba(#000, 0.2) | |
| border-bottom: 1px solid rgba(#fff, 0.2) | |
| overflow: hidden | |
| &__input | |
| display: none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Split a credit card into groups of four for more readable display. | |
| * | |
| * @param {Integer} number Number to split | |
| * | |
| * @return {String} Returns formatted number for display | |
| */ | |
| function splitCardNumber ( number ) { | |
| return number | |
| .toString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| moment.tz( 'US/Eastern' ).set({ hours: moment().hours() }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Hide icons | |
| defaults write com.apple.finder CreateDesktop -bool false && killall Finder | |
| # Show icons | |
| defaults write com.apple.finder CreateDesktop -bool true && killall Finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Return total byte size of all current keys in localStorage. Based on | |
| * UTF-8 encoding for byte size, so not guaranteed to be accurate in | |
| * other encodings. | |
| */ | |
| localStorage.__proto__.size = function () { | |
| return Object.keys( this ) | |
| .map( function ( key ) { | |
| return ( new TextEncoder( 'utf-8' ).encode( localStorage[ key ] ) ).length; | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /(\d{1,3})?(\s|-|\.)?\(?(\d{3})?\)?(\s|-|\.)?(\d{3})(\s|-|\.)?(\d{4})/.exec( string ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Given a raw phone number, parse out individual components. | |
| * | |
| * @param {String} raw Raw phone number to parse | |
| * | |
| * @return {Object} Returns object containing countryCode, areaCode, officeCode | |
| * and stationNumber components | |
| */ | |
| function getPhoneNumberComponents ( raw ) { | |
| // First cut raw string down to just numbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Find: function \((\s)?(.*)(\s)?\) { | |
| Replace: ($1$2$3) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Tag>(.|\s)*?</Tag> |