Skip to content

Instantly share code, notes, and snippets.

@hellonicolas
hellonicolas / gulpfile.js
Last active March 10, 2018 11:30
Build script to help convert Framer projects to Cordova iOS builds
var gulp = require('gulp'),
runSequence = require('run-sequence'),
coffee = require('gulp-coffee'),
htmlreplace = require('gulp-html-replace'),
del = require('del'),
copy = require('gulp-copy'),
wait = require('gulp-wait'),
gutil = require('gulp-util'),
cordova = require("cordova-lib").cordova;
@hellonicolas
hellonicolas / stylus-jeet-rupture-example.html
Last active August 29, 2015 14:20
Example of using Rupture (breakpoints) and Jeet (grids) with Stylus
<div class="container">
<div class="main-content"></div>
<div class="sidebar"></div>
</div>
<!--
krpano
- animated hotspots example
- for Flash and HTML5
-->
<krpano>
<!-- pano -->
<preview url="../../panos/p2/preview.jpg" />
<!--
krpano - tooltips example (for Flash and HTML5)
-->
<krpano>
<!-- pano -->
<preview type="grid(cube,32,32,256,0x223344,0x000011,0xFFFFFF);" details="8" />
<!-- default view -->
function WufooForm() {
this.host = this.host || "wufoo.com", this.userName = "", this.formHash = "", this.ssl = "unset", this.autoResize = !0, this.height = "", this.width = "100%", this.disabled = !1, this.frameUrl = "", this.defaultValues = "", this.header = "show", this.key = "", this.polling = !1, this.resizeDone = "", this.initializeComplete = !1, this.entSource = "", this.initialize = function(params) {
for (var key in params) this[key] = params[key];
this.key = this.formHash + "" + Math.floor(Math.random() * 1e6);
this.generateFrameUrl();
if (this.initializeComplete === !1) {
this.addEvent(window, "message", this.bindMethod(this.addSubmitListener, this));
this.addEvent(window, "message", this.bindMethod(this.resizeWufooForm, this));
this.initializeDone = !0
}
-webkit-mask-image: url('/img/headline-texture-norev.png')
-moz-mask-image: url('/img/headline-texture-norev.png')
-o-mask-image: url('/img/headline-texture-norev.png')
mask-image: url('/img/headline-texture-norev.png')
{
"name": "skyscraper",
"version": "0.0.1",
"repository": "[email protected]:dagency/skyscraper.git",
"browser": {
"jquery": "./app/bower_components/jquery/jquery.min.js",
"bootstrap": "./app/js/vendor/bootstrap.min.js",
"krpano": "./app/js/vendor/krpano.js",
"parallax": "./app/bower_components/parallax/deploy/jquery.parallax.min.js",
"custom-scrollbar": "./app/bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js",
@hellonicolas
hellonicolas / gist:c23d4408f41a279e1b4e
Last active August 29, 2015 14:05
SnapApp - latest
<style>
@font-face { font-family: 'Verlag 4r'; src: url("http://static.ddmcdn.com/fonts/verlag/0D48E15C33A7E866A.eot"); src: local("?"), url("http://static.ddmcdn.com/fonts/verlag/0D48E15C33A7E866A.eot?#hco") format("embedded-opentype"), url(data:application/x-font-woff;base64,d09GRk9UVE8AADhEAA0AAAAAbqgAAQAAAAA2GAAAAiwAAAafAAAAAAAAAABDRkYgAAAI+AAAII0AACjL5e4z70dERUYAACmIAAAAHgAAACAA+wAER1BPUwAAKagAAAoGAAAw9D0pF0NHU1VCAAAzsAAAAFoAAACA6jAts09TLzIAAAGMAAAATwAAAGBZmWUwY21hcAAABogAAAJZAAADVB6pSBNnYXNwAAA0DAAAAAgAAAAIAAAAC2hlYWQAAAEwAAAANAAAADb+1cr8aGhlYQAAAWQAAAAgAAAAJAeCA+FobXR4AAA0FAAAAgMAAAM4kH8jaG1heHAAAAGEAAAABgAAAAYAzlAAbmFtZQAAAdwAAASpAAAL9Egyrwxwb3N0AAAI5AAAABMAAAAg/7gAMnjaY2BkYGBgZHC8m8S5M57f5isDN/MLoAjD2d+Ha2H0/xP/hZm/M58EcjkYmECiAKRFD5N42mNgZGBgPvBfgIGBxeL/if+nmL8zAEVQwDkAoUUHaQAAUAAAzgAAeNpjYGKsZnRlYGVgYdrD1MXAwNADoRnvMhgx/GJAAgsYGOoDGBiqYHwPNTcvIKWkqMSs8N+C4QTzAYYPQP5skBzjEqa7DApAyAQAzokPegB42rVUTW/bRhAdRXJs58OIDeTWAos0MOxAoiXZiqCciroQbJ+KxAiQI0UuRToil1iurLDIryjaX9ACvfZU9NxDf0x/Qw99O1zBdO04TtGaoPftzs
<script type="text/javascript">
var md = new MobileDetect(window.navigator.userAgent),
isMobile = md.mobile() != null ? true : false,
isPhone = md.phone() != null ? true : false,
isTablet = md.tablet() != null ? true : false;
if ( isPhone ) {
var vp = document.getElementById('viewport');
vp.setAttribute('content','width=device-width, initial-scale=.55, user-scalable=no, target-densitydpi=device-dpi');
}
@hellonicolas
hellonicolas / script.js
Created March 26, 2013 22:08
A CodePen by hellonicolas.
//viewport area
var viewportWidth = 546;
var viewportHeight = 323;
var viewCenter = { x: viewportWidth/2, y: viewportHeight/2 };
//image area
var imgWidth = 386;
var imgHeight = 604;
var imgScale = 2.845;
var imgCenter = { x: imgWidth / 2, y: imgHeight / 2 };