Skip to content

Instantly share code, notes, and snippets.

View gneutzling's full-sized avatar

Gabriel Neutzling gneutzling

View GitHub Profile
@gneutzling
gneutzling / fonts.jsx
Last active November 8, 2016 19:29
Show fonts used in a Photoshop file.
// Salvar o script dentro de Photoshop > Presets > Scripts
// http://superuser.com/questions/268785/find-all-the-fonts-used-in-a-photoshop-file
var p = new ActionReference();
function arrayUnique(a){
var t = []
i = a.length;
while(i--) {
@gneutzling
gneutzling / getBrowseActive
Created July 15, 2014 20:52
Verify if the Browser is active
// Verify if the Browser is active
getBrowseActive = function (browserName) {
if (navigator.userAgent.indexOf(browserName) > -1)
return true;
return false;
};
/**
* A simple accordion.
*/
(function (jQuery) {
Drupal.behaviors.FiescAccordion = {
attach: function () {
this.init();
},
@gneutzling
gneutzling / searchDirective
Last active August 29, 2015 13:59
search directive
<div class="search">
<div class="search__field" data-ng-class="{opened: isOpened}">
<input type="text" id="{{name}}" name="{{name}}" placeholder="{{placeholder}}" ng-model="ngModel">
</div>
<label for="{{name}}" sb-tap="toggle()">
<span class="icon icon-search"></span>
</label>
</div>
@gneutzling
gneutzling / basicRouter.js
Created March 24, 2014 14:25
a simple router used in a basic project.
/**
* Router
* @class Router
* @author gneutzling
* @date 2013-12-20
*
* Class.js by John Resig is needed. (http://ejohn.org/blog/simple-javascript-inheritance/)
*/
APP.core.Router = Class.extend({
@gneutzling
gneutzling / gaSimpleEventTrack.js
Last active April 22, 2019 10:35
This is a simple class to track custom events on Google Analytics.
/* gaSimpleEventTrack.js */
var tracking = function (settings) {
this.settings = settings;
this.init = function () {
this.setup();
this.bind();
};

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
{
"bitwise": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"newcap": true,
"esnext": true,
"latedef": true,
"noarg": true,
"node": true,
@gneutzling
gneutzling / custom-input-file.html
Last active December 18, 2015 13:58
Exemplo de custom input file para o post no http://dailydevtips.com/
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Custom Input File</title>
<style type="text/css">
* {margin: 0; padding: 0;}
.input-file {
position: relative;
width: 200px;