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
@mixin font-face($font-family, $file-path, $font-weight, $font-style) { | |
@font-face { | |
font-family: $font-family; | |
src: url('#{$file-path}.eot'); | |
src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'), | |
url('#{$file-path}.woff') format('woff'), | |
url('#{$file-path}.ttf') format('truetype'), | |
url('#{$file-path}.svg##{$font-family}') format('svg'); | |
font-weight: $font-weight; | |
font-style: $font-style; |
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
//////* Transition *////// | |
@mixin transition($property: all, $duration: 0.5s, $easing: ease-out) { | |
transition: $property $duration $easing; | |
} | |
@mixin delay($duration: 0.5s) { | |
transition-delay: $duration; | |
} | |
//////* Transforms *////// |
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
@mixin scanlines($color, $height: 1px, $angle: 0, $opacity: 0.2) { | |
position: relative; | |
&:after { | |
background-image: repeating-linear-gradient(to bottom, transparent 0 ,transparent $height, $color $height, $color $height * 2); | |
background-size: 100% $height * 2, cover; | |
transform-origin: 50% 50%; | |
transform: rotate($angle); | |
content: ''; | |
opacity: $opacity; | |
position: absolute; |
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
function walk(dirPath) { | |
const stats = fs.lstatSync(dirPath) | |
let type = mime.lookup(dirPath) | |
var data = [] | |
if(stats.isFile()) { | |
data.push({ | |
path: dirPath.replace(/\\/gi, '/'), | |
name: path.basename(dirPath), | |
type |
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
const bytes = (s) => ~-encodeURI(s).split(/%..|./).length; | |
const jsonSize = (s) => bytes(JSON.stringify(s)); |
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
const pipe = (...ops) => ops.reduce( | |
(a, b) => (...arg) => b(a(...arg)) | |
) |
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
const parseHex = (hex) => (startChar, endChar) => | |
parseInt(hex.slice(startChar, endChar), 16); | |
function hexToRGBA(hex, a = 1) { | |
const r = parseHex(hex)(1, 3); | |
const g = parseHex(hex)(3, 5); | |
const b = parseHex(hex)(5, 7); | |
return `rgba(${r},${g},${b},${a})`; | |
} |
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'; | |
import { View, TextInput, Animated } from 'react-native'; | |
import Icon from '../Icon'; | |
export default class FloatingLabelInput extends Component { | |
state = { | |
isFocused: false | |
}; | |
componentWillMount() { |
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
const asyncCompose = (…functions) => input => functions.reduceRight((chain, func) => chain.then(func), Promise.resolve(input)); | |
const asyncPipe = (…functions) => input => functions.reduce((chain, func) => chain.then(func), Promise.resolve(input)); |
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 { Buffer } from 'buffer'; | |
const generateBasicToken = (user, pass) => | |
new Buffer([user, pass].join(':')).toString('base64'); |
OlderNewer