View gist:d0db225a7fadd7caed9de6f112548e3c
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
<div class="profile"> | |
<div | |
class="profile-image" | |
style="background: url('/images/<%= person.imgSrc %>') top center no-repeat; background-size: cover;" | |
></div> | |
<div class="profile-details"> | |
<h1 class="profile-name"> | |
<%- person.firstname %> <%- person.lastname %> | |
</h1> |
View gist:af033387a6d947f17669d6e43236a628
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 Assets from 'assets-manager'; | |
Assets.addQueue('general', appData.assets.general) | |
Assets.addQueue('intro', appData.assets.intro) | |
Assets.addQueue('projects', appData.assets.projects) | |
// No layout.js, chamamos: | |
Assets.start('general'); | |
// No intro.js, chamamos: |
View gist:b1edd0aa28b96a7df4ec7a11f180da15
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
{ | |
'general': [ | |
'path/to/file.jpg', | |
'path/to/file2.jpg' | |
'path/to/file3.jpg' | |
], | |
'intro': [ | |
'path/to/file.jpg', | |
'path/to/file2.jpg' | |
'path/to/file3.jpg' |
View gist:c64c8a29fedee3a1363354c55e5dbe00
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 to disable "pull-to-refresh" effect present in some webviews. | |
// Especially Crosswalk 12 and above (Chromium 41+) runtimes. | |
window.addEventListener('load', function() { | |
var lastTouchY = 0 ; | |
var maybePreventPullToRefresh = false ; | |
// Pull-to-refresh will only trigger if the scroll begins when the | |
// document's Y offset is zero. |
View parse json
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
_get_images: (data, imgs=[])-> | |
for prop, val of data | |
if /(jpg|png|gif)$/.test(data[prop]) | |
imgs.push data[prop] | |
if Array.isArray(data[prop]) | |
for c in data[prop] | |
@_get_images c, imgs | |
return imgs |
View typo
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
letter_spacing($spacing) | |
letter-spacing: unit($spacing/1000, 'em'); | |
font_size($size, $leading) | |
font-size $size | |
if $leading | |
line-height: unit(100 * ($leading / $size), "%") |
View odom.coffee
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
module.exports = function(jObj) { | |
var obj; | |
obj = { | |
_y: 1000, | |
_x: 1000, | |
_opacity: 0, | |
dom: jObj | |
}; | |
Object.defineProperty(obj, "y", { | |
get: function() { |
View get-sprite-retina
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 get-sprite($imgs, $name, $resize : false) | |
{ | |
$dimensions: true !default; | |
$clean-up: true !default; | |
$layout:vertical !default; | |
$map: sprite-map($imgs, $layout: $layout, $cleanup: $clean-up, $spacing: 15px); | |
background: $map no-repeat; | |
@include sprite($map, $name, $dimensions, 0, 0); |
View loopinfinito.htaccess
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
--- | |
layout: none | |
permalink: .htaccess | |
--- | |
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible | |
# httpd.apache.org/docs/2.2/howto/htaccess.html |
View namespace.js
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 namespace(name) | |
{ | |
var namespaces = name.split("."); | |
var name = ""; | |
function getName(parent) | |
{ | |
if(namespaces.length > 0) | |
{ | |
name = namespaces.shift(); |
NewerOlder