Skip to content

Instantly share code, notes, and snippets.

View ericorruption's full-sized avatar
🎵

Eric Quanz ericorruption

🎵
View GitHub Profile
@ericorruption
ericorruption / readme.md
Created November 29, 2016 01:21
Mobile Brazil Conference Annotations

Mobile Brazil Conference

Design for all five senses

Visão:

  • Objetos reais são mais interessantes que botões

  • Qualidade de imagens (Performance?)

  • Escalonar imagens antes de alocá-las na memória

@ericorruption
ericorruption / _embed.scss
Created November 10, 2016 17:22
responsive embed object
.o-embed {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
iframe,
object,
embed {
@ericorruption
ericorruption / gist:ff240cdaf0348edf16b4a081cd87c9b7
Created October 26, 2016 00:20
calculate gzipped size of file
gzip -c filename.min.js | wc -c
/* global ga */
function throttle(callback, limit) {
let wait = false;
return function() {
if (!wait) {
callback.call();
wait = true;
setTimeout(function() {
@ericorruption
ericorruption / command.sh
Created September 18, 2016 15:20
import mysql dump file
mysql -u <username> -p <databasename> < <filename.sql>
@ericorruption
ericorruption / Vagrantfile
Created September 5, 2016 18:07
minimal vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", ip: "192.168.33.10"
@ericorruption
ericorruption / README.md
Created August 23, 2016 17:40
README template

Project name

A short project description.

Dependencies

List all dependencies for mac / windows with all the quirks associated with each one. These are the ones that are not locally installed through package managers (npm, composer, gems...)

Installing

  • How should the developer download this project (most probably cloning)?
  • Things to consider explaining: setting up and seeding the database, what web server to use, anything that needs to be set up before working on this project...
@ericorruption
ericorruption / wp-config.php
Created July 29, 2016 17:34
Wordpress: Forcing site url and home on wp-config.php
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . ':8888');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] . ':8888');
@ericorruption
ericorruption / _scope.scss
Created June 15, 2016 20:06
scope-specific styles
// This class is used as wrapper for user-generated content.
.c-scope {
h2 {
}
p {
}
@ericorruption
ericorruption / router.js
Created June 15, 2016 19:07
very barebones router to load specific es6 modules when the page loads.
'use strict';
const path = location.pathname;
function initialize() {
switch(path) {
case 'path':
// load module here
break;
}