function (text) {
return text.toString().toLowerCase()
.replace(/[_-]/g, ' ')
.replace(/(?:^|\s)\S/g, function(a) {
return a.toUpperCase();
});
}
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 axios from 'axios'; | |
class Http { | |
constructor() { | |
this.axios = axios.create({ | |
baseURL: 'http://localhost:4567', | |
timeout: 5000 | |
}); | |
} |
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 webpack = require('webpack'); | |
const webpackTargetElectronRenderer = require('webpack-target-electron-renderer'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const BabiliPlugin = require('babili-webpack-plugin'); | |
const Paths = { | |
Entry: './app/index', | |
Output: './build', | |
Public: 'http://localhost:9000/build/', |
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
/** | |
* Simple is object check. | |
* @param item | |
* @returns {boolean} | |
*/ | |
function isObject(item) { | |
return (item && typeof item === 'object' && !Array.isArray(item)); | |
} | |
/** |
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
<!-- Apple App Store --> | |
<svg version="1.1" class="download-btn" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="-237.1 377.9 133.1 38.2" enable-background="new -237.1 377.9 133.1 38.2" role="img" aria-label="Download on the Apple store" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"> | |
<g fill="currentColor"> | |
<path d="M-157.1,389.6c0.2-0.1,0.3-0.3,0.4-0.6c0-0.1,0-0.1,0-0.2v-0.7c-1.2,0-1.7,0.3-1.7,1c0,0.2,0.1,0.4,0.2,0.6 | |
s0.3,0.2,0.5,0.2C-157.5,389.8-157.3,389.7-157.1,389.6z"></path> | |
<path d="M-167,400.4c-0.5,0-1,0.2-1.4,0.5c-0.4,0.3-0.7,0.8-0.8,1.4c-0.1,0.3-0.1,0.5-0.1,0.6v1.6c0,0.7,0.2,1.3,0.6,1.8 | |
c0.4,0.5,1,0.7,1.7,0.7c0.8,0,1.4-0.3,1.9-0.9c0.4-0.6,0.7-1.4,0.7-2.4c0-0.9-0.2-1.7-0.6-2.3C-165.6,400.7-166.2,400.4-167,400.4z | |
"></path> | |
<path d="M-163,386.4c-0.4,0-0.7,0.2-1,0.6c-0.2,0.3-0.3,0.7-0.3,1.1c0,0.4,0.1,0.8,0.3,1.1c0.2,0.4,0.5,0.6,1,0.6 | |
c0.4,0,0.7-0.2,0.9-0.6c0.2-0.3,0.3-0.7,0.3-1.1s-0.1-0.8-0.3-1.1C-162.3,386.6-162.6,386.4-163,386.4z"></p |
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
#! /usr/bin/env node | |
const version = process.argv[2]; | |
if (!version) { | |
throw new Error('Provide a new version (vX.X.X)') | |
} else if (version[0] !== 'v') { | |
version = 'v' + version | |
} |
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
// Only dependency is the lodash library | |
function deepDiff(oldObj, newObj) { | |
// Instantiate our changes obj | |
var changes = {}; | |
// Make sure we are working with objects | |
oldObj = _(oldObj).value(); | |
newObj = _(newObj).value(); | |
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
# gist |
NewerOlder