Skip to content

Instantly share code, notes, and snippets.

View cristoferdomingues's full-sized avatar

Cristofer Domingues cristoferdomingues

  • Florianópolis, Brazil
View GitHub Profile
@adamloving
adamloving / fb-fan-export.js
Created January 18, 2011 01:02
Export Facebook Page Fans
/*
For more detailed instructions on how to use this script, sign up with your email here:
http://adamloving.com/internet-programming/how-toexport-facebook-page-fans
DISCLOSURE: This javascript runs in your browser pretending to be you
looking through your page fans. Facebook should have no problem with this,
but who knows if they will think it is strange to see you looking through
all your fans so quickly (the script waits 3s before requesting each page).
I've had no problem running this so far for 1000s of page fans, but I
@chrisjlee
chrisjlee / media-queries.scss
Last active January 6, 2024 12:36
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@kris-ellery
kris-ellery / JS-error-tracking-with-GA.js
Last active November 18, 2021 19:00
Track JavaScript errors using Universal Analytics from Google.
/**
* Track JS error details in Universal Analytics
*/
function trackJavaScriptError(e) {
var errMsg = e.message;
var errSrc = e.filename + ': ' + e.lineno;
ga('send', 'event', 'JavaScript Error', errMsg, errSrc, { 'nonInteraction': 1 });
}
// Usage:
// OfflineListener.init(true);
define(['angular', 'core'], function(angular){
// Some concepts from: https://github.com/HubSpot/offline
var module = angular.module('utils.offline', []);
module.service('OfflineListener', function ($rootScope, $window, $alert) {
var offlineAlert;
@igorcosta
igorcosta / cpf_cnpj_validator
Created June 26, 2014 19:13
Regex para validar CPF e CNPJ
Para CPF
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/
Para CNPJ
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/
Para ambos ao mesmo tempo
@Turbo87
Turbo87 / app.js
Created February 15, 2015 04:05
webpack + font-awesome test
require('font-awesome/css/font-awesome.css');
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>';
@digitalicarus
digitalicarus / fiddle.css
Last active February 2, 2021 15:15
React Animation: List Filter Animation
.super-fly-list-component .measure {
position: absolute;
left: -9999px;
}
.super-fly-list-component {
position: relative;
}
.super-fly-list-component li {
position: absolute;
transition: opacity .3s ease, transform .3s ease, top .1s ease;
@thejmazz
thejmazz / .babelrc
Created February 16, 2016 18:17
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}
import React, { Component } from 'react'
import { Router, Route, Link, IndexRoute, hashHistory, browserHistory, DefaultRoute, IndexLink } from 'react-router'
class App extends Component {
render () {
return (
<Router history={hashHistory}>
<Route path='/' component={Container}>
<IndexRoute component={Home} />
<Route path='/address' component={Address}>
@sagalbot
sagalbot / karma.conf.js
Created April 29, 2016 19:28
Karma Config for Webpack/Vue/Jasmine
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
frameworks: ['jasmine'],
files: ['test/**/*.js'],
reporters: ['spec'],
preprocessors: {
'test/*.js': ['webpack']
},
singleRun: true,