This file contains 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
/** | |
* Params below: use as-is to generate a hollow two-figure pie chart (donut chart) | |
* @var[width]: pie chart width | |
* @var[height]: pie chart height | |
* @var[innerRadius]: inner (hollow) circle radius | |
* @var[colorRange]: first and second (respective) colors rendered in pie chart | |
* @var | |
*/ | |
var width = 90, | |
height = 90, |
This file contains 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
extension UIView { | |
/* Example use: myView.addBorder( | |
toSide: .Left, | |
withColor: UIColor.redColor().CGColor, | |
andThickness: 1.0 | |
) | |
*/ | |
enum ViewSide { |
This file contains 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
// This syntax reflects changes made to the Swift language as of Aug. '16 | |
extension UIView { | |
// Example use: myView.addBorder(toSide: .Left, withColor: UIColor.redColor().CGColor, andThickness: 1.0) | |
enum ViewSide { | |
case Left, Right, Top, Bottom | |
} | |
This file contains 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
// Example usage of Inject-Script.js | |
// Example 1: Load a script from an external URL. (preferred method) | |
// You can call this in a React/Vue/whatever component lifecycle, or wherever. | |
// makes sense. Window globals (e.g. `window.YT`) will be available after calling this. | |
await injectScriptBySrc("https://www.youtube.com/iframe_api", "yt"); | |
// now you can use `window.YT` methods and properties in your code. | |
This file contains 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
/****************************************** | |
* File : Animations.css | |
*******************************************/ | |
@keyframes fade-in { | |
from { | |
opacity: 0; | |
} | |
to { |
This file contains 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
import React, { Component } from 'react'; | |
/** | |
* HOC for asynchronously loading a component dependency. | |
* | |
* Use: replace | |
* import MyComponent from './path/to/my-component'; | |
* | |
* With: | |
* const MyComponent = AsyncLoader(() => import('./path/to/my-component')); |
This file contains 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
/* ImageLoader styles */ | |
.image-loader.image-loader--rounded { | |
border-radius: 100%; | |
padding: 0.4rem; | |
&:hover { | |
animation: scale-up 250ms linear; | |
} | |
} |
This file contains 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
:root { | |
--sm: 0.4rem; | |
--md: 0.6rem; | |
--lg: 1.2rem; | |
} | |
/* */ | |
.list-view { | |
display: grid; | |
padding: 0; |