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
<html> | |
<body> | |
<div id="react-root"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.0.0/umd/react.production.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.0.0/umd/react-dom.production.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> | |
<script id="react-app" type="text/template"> | |
const App = ({name}) => { |
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
var images = ["path/to/image", "path/to/image", ... , "path/to/image"], | |
preloaded = images.length; | |
_.each(images, function(img) { | |
var image = $('<img />').attr('src', img); | |
image.on('load', function(){ | |
preloaded--; | |
if (preloaded === 0){ | |
console.log("All preloaded!"); | |
} |
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
[category = '8'] { | |
line-color: #7F3C8D; | |
} | |
[category = '9'] { | |
line-color: #11A579; | |
} | |
[category = '18'] { | |
line-color: #3969AC; | |
} | |
[category = '2'] { |
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
# Exclude files that don't need to be on the server | |
# Used by rsync when deploying code to the server | |
.excludes | |
.git | |
.gitignore | |
log/ | |
tmp/ |
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 image-2x($image, $width, $height) { | |
@media (min--moz-device-pixel-ratio: 1.3), | |
(-o-min-device-pixel-ratio: 2.6/2), | |
(-webkit-min-device-pixel-ratio: 1.3), | |
(min-device-pixel-ratio: 1.3), | |
(min-resolution: 1.3dppx) { | |
background-image: image-url($image); | |
background-size: $width $height; | |
} |
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
/* normal flexbox */ | |
.flexbox .flex-container { | |
display: -webkit-flex; | |
display: -moz-flex; | |
display: -ms-flex; | |
display: flex; | |
} | |
.flexbox .flex-container.vertical { | |
display: -webkit-flex; | |
display: -moz-flex; |
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
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime |
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
var http = require('http'); | |
http.createServer(function(req, res){ | |
res.writeHead(200,{'Content-Type':'text/plain'}); | |
res.end('Hello world'); | |
}).listen(8080, '127.0.0.1'); | |
console.log("Node server running at http://localhost:8080"); |
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 loadScript(path, fn) { | |
var el = document.createElement('script'), | |
loaded = 0, | |
onreadystatechange = 'onreadystatechange', | |
readyState = 'readyState'; | |
el.onload = el.onerror = el[onreadystatechange] = function () { | |
if (loaded || (el[readyState] && !(/^c|loade/.test(el[readyState])))) return; | |
el.onload = el.onerror = el[onreadystatechange] = null; | |
loaded = 1; |