Skip to content

Instantly share code, notes, and snippets.

View gabriel-seb's full-sized avatar

Gabriel M. gabriel-seb

  • SEB - Sistema Educacional Brasileiro
  • Ribeirão Preto
View GitHub Profile
@gabriel-seb
gabriel-seb / XGH
Last active August 29, 2015 14:18
XGH Manifest
XGH - Extreme GoHorse
1- Pensou, não é XGH.
XGH não pensa, faz a primeira coisa que vem à mente.
Não existe segunda opção, a única opção é a mais rápida.
2- Existem 3 formas de se resolver um problema:
- A correta;
- A errada;
$.fn.listHandlers = function(events, outputFunction) {
return this.each(function(i){
var elem = this,
dEvents = $(this).data('events');
if (!dEvents) {return;}
$.each(dEvents, function(name, handler){
if((new RegExp('^(' + (events === '*' ? '.+' : events.replace(',','|').replace(/^on/i,'')) + ')$' ,'i')).test(name)) {
$.each(handler, function(i,handler){
outputFunction(elem, 'n' + i + ': [' + name + '] : ' + handler );
});
@gabriel-seb
gabriel-seb / placa.php
Last active August 29, 2015 14:15 — forked from putyoe/placa.php
<?php
// Desenvolvido Para fins EDUCATIVOS.
// Criado em 12/11/2014
// Contato: putyoe@hotmail.com
$placa = '';
$request = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ><soap:Header><dispositivo>GT-S1312L</dispositivo><nomeSO>Android</nomeSO><versaoAplicativo>1.1.1</versaoAplicativo><versaoSO>4.1.4</versaoSO><aplicativo>aplicativo</aplicativo><ip>177.206.169.90</ip><token>5021719229f7ddad0c786542da534ad0375f021f</token><latitude>-3.6770324</latitude><longitude>-38.6791411</longitude></soap:Header><soap:Body><webs:getStatus xmlns:webs="http://soap.ws.placa.service.sinesp.serpro.gov.br/"><placa>'.$placa.'</placa></webs:getStatus></soap:Body></soap:Envelope>';
$header = array(
"Content-type: application/x-www-form-urlencoded; charset=UTF-8",
@gabriel-seb
gabriel-seb / .htaccess
Last active August 29, 2015 14:14
Codeigniter basic settings
#IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^/.*$ [NC]
// Simple script that exports a users "Saved For Later" list out of Feedly
// as a JSON string.
//
// This was intended for use in the Google Chrome's "Inspector" tool so your
// mileage may vary if used in other contexts.
//
// Format of JSON is as follows:
// [
// {
// title: "Title",
@gabriel-seb
gabriel-seb / debug_helper
Last active August 29, 2015 14:09
Dump Helper
<?php
/**
* Dump helper. Functions to dump variables to the screen, in a nicley formatted manner.
* @author Joost van Veen
* @version 1.0
*/
if (!function_exists('dump')) {
function dump($var, $label = 'Dump', $echo = TRUE) {
@gabriel-seb
gabriel-seb / media-queries
Created November 6, 2013 12:05
CSS Media Queries and tips
/* Remove zoom e fixa conteudo na viewport: */
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" /> */
/* Media Queries V1.0 */
@media only screen and (max-width: 1460px) { }
@media only screen and (max-width: 1279px) { }
@media only screen and (max-width: 1024px) { }
@media only screen and (max-width: 800px) { }
@media only screen and (max-width: 500px) { }
@media only screen and (max-width: 500px) and (orientation:landscape) { }
<style>
body{
background: #E9F1FC;
}
.line {
float: left;
background: #C3CADA;
width: 2px;
height: 200px;
margin: 0px 0px 0px 10px;
<style>
body {
margin:50px 0px; padding:0px;
text-align:center;
}
.content {
width:500px;
margin:0px auto;
text-align:left;
@gabriel-seb
gabriel-seb / facebook-timeline
Last active December 23, 2015 11:29
Facebook Timeline
<style>
.line {
float: left;
background: #C2DFFF;
width: 2px;
height: 200px;
margin: 0px 0px 0px 10px;
}
.point {
width: 20px;