Skip to content

Instantly share code, notes, and snippets.

View felquis's full-sized avatar
💻
Coding since 2011 ☕ fueled by curiosity 🔍 always exploring

Ofelquis G felquis

💻
Coding since 2011 ☕ fueled by curiosity 🔍 always exploring
View GitHub Profile
shell: {
facebookDownload: {
command: [
'echo "## Downloading Facebook Plugin"',
'git clone [email protected]:Wizcorp/phonegap-facebook-plugin.git .tmp-plugin/phonegap-facebook-plugin/',
'cd .tmp-plugin/phonegap-facebook-plugin/',
'echo "## Checkout tag v0.11.0"',
'git checkout v0.11.0 -q',
'cd ./../../'
@felquis
felquis / globals.get.js
Last active July 11, 2017 11:23
Find global variables in the browser, discover global variables a web side is exposing in JavaScript
/*
Usage
global.get() // return Array of globals found
*/
;(function (global) {
function Globals () {}
var accordion = (function ($) {
'use strict'
var accordionMethods = {},
tabsList,
tabWrapper,
tabSelector,
tabWrapper,
@felquis
felquis / Gruntfile.js
Last active August 29, 2015 14:16
Facebook Plugin configuration
// `grunt-shell` config:
shell: {
facebookDownload: {
command: [
'echo "## Downloading Facebook Plugin"',
'git clone [email protected]:Wizcorp/phonegap-facebook-plugin.git .tmp-plugin/phonegap-facebook-plugin/',
'cd .tmp-plugin/phonegap-facebook-plugin/',
'echo "## Checkout tag 0.10.1"',
'git checkout 0.10.1 -q',
@felquis
felquis / data.js
Last active August 29, 2015 14:12
var item = {
'property-one':[
{name: 'string', id: 1, total: 1},
{name: 'string', id: 2, total: 1},
{name: 'string', id: 3, total: 1},
{name: 'string', id: 4, total: 1},
{name: 'string', id: 5, total: 1}
],
'property-two': [
{name: 'string', id: 6, total: 1},
@felquis
felquis / Ionic-report:-problem-with-view-events.markdown
Created December 16, 2014 22:23
Ionic report: problem with view events
$scope.loadingNewPhoto = false;
$cordovaCamera.getPicture({
sourceType: (index == 1) ? Camera.PictureSourceType.PHOTOLIBRARY : Camera.PictureSourceType.CAMERA,
destinationType: (typeof Camera !== "undefined") ? Camera.DestinationType.FILE_URI : false,
targetWidth: 512,
targetHeight: 512
}).then(function(imageData) {
var ft = new FileTransfer();
@felquis
felquis / example.js
Last active December 26, 2015 22:09
Retira caracteres especiais para serem usados como URLs, ou para qualquer outra como que não seja aceito caracteres especiais como letras acentuadas ou interrogações entre outros.
var url = toUrl('Você mora em São Paulo?');
console.log(url); // voce-mora-em-sao-paulo
@felquis
felquis / example.js
Last active December 26, 2015 18:58
Retorna uma URL para compartilhamento de conteúdo no Facebook.
var url = shareURL({
url: 'http://felquis.com/',
image: 'http://felquis.com/img/posts/ilusao-de-muller-lyer.jpg',
title: 'Titulo que você quiser',
summary: 'Descrição que você quiser'
})
@felquis
felquis / algo.js
Created January 3, 2013 13:10
Um fragmento do HTJSON
li = HTJSON.parse({
li : {
content : {
label : {
attr : {
'for' : 'amount'
},
content : 'Donation amount ($50 increments):';
},
input : {