Skip to content

Instantly share code, notes, and snippets.

View williankeller's full-sized avatar
💻
Software engineer

Willian Keller williankeller

💻
Software engineer
View GitHub Profile
var test = require('tape')
var feedCat = require(process.argv[2])
test('tests', function (t) {
t.equal(feedCat('food'), 'yum')
t.throws(feedCat.bind(null, 'chocolate'))
})
@williankeller
williankeller / _dependencies.scss
Created September 1, 2015 18:46
Dependências de margens e Grades de colunas
// Margens
$margins: top bottom left right;
@each $margin in $margins{
@for $i from 1 through 10 {
.m-#{$margin}-#{$i} {
margin-#{$margin}: $i * 10px;
@williankeller
williankeller / gulpfile.js
Created August 27, 2015 20:12
Gulp File to Automatizate Compilation
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var livereload = require('gulp-livereload');
var gulpCssGlobbing = require("gulp-css-globbing");
var imagemin = require('gulp-imagemin');
var spritesmith = require('gulp.spritesmith');
@williankeller
williankeller / package.json
Created August 27, 2015 20:08
Package Json to Sandbox Project
{
"name": "sandbox",
"version": "1.0.0",
"scripts": {
"sass:dev": "./node_modules/.bin/gulp",
"sass:prod": "./node_modules/.bin/gulp sass:prod"
},
"dependencies": {},
"devDependencies": {
"breakpoint-sass": "^2.6.1",
error: function (_jqxhr, text, error) {
switch (_jqxhr.status) {
case 404:
case 500:
console.log("Erro: " + error + " - " + text);
console.log(_jqxhr);
break;
default:
console.log(_jqxhr);
}
@williankeller
williankeller / Efeito no clique do botão
Last active August 29, 2015 14:23
Efeito no clique do botão (Efeito Android Lollipop)
function efeito(t, e) {
var a = '.efeito',
c = '<span class="efeito"></span>';
t.append(c);
$(a).css({'top': e.offsetY, 'left': e.offsetX});
setTimeout(function () {
var toggleInputPlaceholder = function() {
if ($(".placeholder").val() != '') {
$(".placeholder").next("label").hide();
}
$(".placeholder").focus(function() {
$(this).next("label").hide();
});
<html>
<head>
<title>Checkbox Usando Switch</title>
<style>
*, :after, :before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
label {
(function() {
/*
* Remove estilos in-line e adiciona no cabeçalho do site
*
* @author Willian Keller
*
* Definições das Variáveis
*
* @variables
* a = Array (saída do laço de repetição)
(function ($) {
var b = $(document),
d = $(window),
e = null,
c;
function a(a) {
document.title = a;
}
c = b.find("title").text(),