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 scrollbars when not hovering container in Atom. | |
For Windows especially. | |
Get those scrollbars out of your way. | |
Put this in your 'style.less'. | |
Open Settings click 'Open config folder' | |
This was really getting to me, thanks for |
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
/* | |
Calculate modular scalled font-sizes for headlines in Stylus | |
"Modular scale refers to a series of harmonious numbers | |
that relate to one another in a meaningful way." | |
Inspired after reading http://typographyhandbook.com/#font-sizing | |
Build after http://www.modularscale.com/ | |
*/ | |
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
/* | |
This file is build to have somehting to paste into code highlighters or editors and see how they display JavaScript. | |
It therefor includes many random things you might do in JS. | |
*/ | |
function hello() { | |
var hello = 'hello' | |
let world = "world" | |
const helloWorld = hello + ` ${world}` | |
return(helloWorld) |
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
/** | |
* Walks a filestructure starting from a given root and returns all found files to a callback, using a filter. | |
* @param {String} dir - Root directory | |
* @param {RegEx} filter - RegEx to test found files against | |
* @param {Function} done - Callback will be called with (err, foundFiles) | |
* @private | |
*/ | |
function walk(dir, filter, done) { | |
var results = []; | |
fs.readdir(dir, function(err, list) { |
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
const path = require('path') | |
const webpack = require('webpack') | |
module.exports = { | |
entry: { | |
main: "./src/js/index.js" | |
}, | |
output: { | |
path: path.join(__dirname, 'build', 'js'), | |
filename: "[name].js" |
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
/* | |
Logging middleware for Redux as suggested by the official documentation. | |
http://redux.js.org/docs/advanced/Middleware.html | |
*/ | |
export const logger = store => next => action => { | |
console.log('dispatching\n', action) | |
let result = next(action) | |
console.log('next state\n', store.getState()) | |
return result |
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
# Deploy hexo site by travis-ci | |
# https://github.com/jkeylu/deploy-hexo-site-by-travis-ci | |
# LICENSE: MIT | |
# | |
# 1. Copy this file to the root of your repository, then rename it to '.travis.yml' | |
# 2. Replace 'YOUR NAME' and 'YOUR EMAIL' at line 29 | |
# 3. Add an Environment Variable 'DEPLOY_REPO' | |
# 1. Generate github access token on https://github.com/settings/applications#personal-access-tokens | |
# 2. Add an Environment Variable on https://travis-ci.org/{github username}/{repository name}/settings/env_vars | |
# Variable Name: DEPLOY_REPO |
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
/* | |
, , | |
/ \/ \ | |
(/ //_ \_ | |
.-._ \|| . \ | |
\ '-._ _,:__.-"/---\_ \ | |
______/___ '. .--------------------'~-'--.)__( , )\ \ | |
`'--.___ _\ / | Here ,' \)|\ `\| | |
/_.-' _\ \ _:,_ Be Dragons " || ( | |
.'__ _.' \'-/,`-~` |/ |
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
# FTP deploy Hexo based site using Travis-ci.org | |
# https://gist.github.com/HoverBaum/524528aec1032b29669fe9cc82dba066 | |
# | |
# 1. Copy this file to the root of your repository, then rename it to '.travis.yml' | |
# 2. Replace 'YOUR NAME' and 'YOUR EMAIL' | |
# 3. Create "Environment Variables" in travis. Make sure to not show them in the output. | |
# - FTP_USER: The username for FTP transfer. | |
# - FTP_PASSWORD: Password for the user. | |
# 4. Replace "DOMAIN.TLD" with your FTP domain and maybe the path where to put things. | |
# |
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
const numbers = [1, 2, 3, 4] | |
const list = html` | |
<ul> | |
${numbers.map(number => `<li>${number}</li>`)} | |
</ul>` | |
/* | |
At this point we have: | |
<ul> |