Skip to content

Instantly share code, notes, and snippets.

@rogierslag
rogierslag / nginx.conf
Last active May 30, 2017 14:46 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
<?php
/**
* Twig engine for KirbyCMS
*
* @author Pereira Ricardo <hello@nunopress.com>
* @license MIT
*/
/**
@hamstu
hamstu / parallax.js
Last active February 7, 2024 15:20
Parallax Example: JavaScript
var ParallaxManager, ParallaxPart;
ParallaxPart = (function() {
function ParallaxPart(el) {
this.el = el;
this.speed = parseFloat(this.el.getAttribute('data-parallax-speed'));
this.maxScroll = parseInt(this.el.getAttribute('data-max-scroll'));
}
ParallaxPart.prototype.update = function(scrollY) {
@panurge-ws
panurge-ws / gist:525caef640784a487aa2
Last active May 20, 2016 10:38
A Videgular plugin to emulate background-size CSS property for video (see comment below).
/*
* vg-bkg-size
* A Videogular plugin to emulate background-size CSS property for video: "cover" or "contain"
*
* Use:
* <videogular vg-bkg-size="cover" center="true"></videogular>
* vg-bkg-size => "cover" or "contain"
* center => true or false
*
* Copyright (c) 2014 Panurge Web Studio
@d-simon
d-simon / Commit_Guidelines.md
Last active January 31, 2021 10:43
Commit Guidelines

Commit Message Guidelines

This is a proposal for structuring commit messages. It is a set of guidelines evolved from a need to scan, review and navigate commits quickly. They are ment to bring clarity to the commit history while retaining a lot of flexibility.

Structure

[Action] Scope: Summary

(Involved Commits)
@Jakobud
Jakobud / bootstrap-ms.scss
Last active June 15, 2022 12:42 — forked from andyl/bootstrap_ms.css.scss
Adds in the missing 480px-797px breakpoint range to Bootstrap 3 for SASS
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
//
// This is a hack to fill the gap between 480 and 767 pixels - a missing range
// in the bootstrap responsive grid structure. Use these classes to style pages
// on cellphones when they transition from portrait to landscape.
//
// Contains:
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout
// Visibility classes for the Mid-Small layout
// Redefined visibility classes for the Extra Small layout
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created April 3, 2014 07:41
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
// Hacking made easy
// ---
// A couple of Sass functions
// To ease the pain of dealing
// With special values for IE
@d-simon
d-simon / iterator_async_callback.js
Created March 7, 2014 00:49
For-Loop / Pass iterator into async callback
for (var i = 0; i < array.length; i++) (function (i, arrayElement) {
// this will create a new variables i and arrayElement for each loop iteration
// so we can use it in an async callback
doSomeAsync(function callback () {
console.log(i, arrayElement);
});
}) (i, array[i]);
@backflip
backflip / bower.json
Last active August 30, 2019 12:03 — forked from GFoley83/load-google-maps.js
Load Google Maps API using jQuery Deferred
{
"name": "load-google-maps",
"version": "1.0.0",
"main": ["./load-google-maps.js"],
"author": "Glenn Baker & Gavin Foley",
"dependencies": {
"jquery": ">=1.5"
},
"license": ["MIT", "GPL"],
"keywords": ["Google Maps", "Async"]
@MarcDiethelm
MarcDiethelm / strongloop-heroku.md
Last active July 17, 2019 05:59
How to install a Node.js app using Strongloop on Heroku

How to install a Node.js app using Strongloop on Heroku

with different environments like staging and production no less! new: now with multiple account administration!

  1. Create a Node.js app as you would normally, managing your dependencies with npm in package.json.
  2. Your app should be set up to listen on process.env.STRONGLOOP_PORT || [your usual local port].
  3. Download and install the Heroku toolbelt. This install includes git.

➽ If you need to handle multiple accounts, install the accounts plugin.