Skip to content

Instantly share code, notes, and snippets.

View renatorib's full-sized avatar

Renato Ribeiro renatorib

View GitHub Profile
@renatorib
renatorib / jfilter.js
Last active August 29, 2015 13:56
jQuery por Data Attributes
/* Filtro de Conteudo por Atributos Data */
$('[data-slct]').click(function(e){
$('[data-slct]').removeClass('active');
$(this).addClass('active');
var scope = $(this).data('slct-name');
var selected = $(this).data('slct');
$("[data-"+ scope +"]").not("[data-"+ scope +"*='"+ selected +"']").fadeOut('fast');
$("[data-"+ scope +"*='"+ selected +"']:hidden").fadeIn('fast');
e.preventDefault();
});
@renatorib
renatorib / mygrid.css
Last active August 29, 2015 14:00
MyGrid 1.1
/**
* MyGrid.css
* 24, 12, 6, 4, 3, 2 or 1 columns all in one.
*
* @repository https://github.com/renatorib/mygrid.css
* @fork https://github.com/renatorib/mygrid.css/fork
* @clone https://github.com/renatorib/mygrid.css.git
*
* @license GPL v2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author Renato Ribeiro (https://lugri.com/)
@renatorib
renatorib / accordion.html
Created May 22, 2014 21:32
jQuery Accordion
<dl class="accordion">
<dt><a href="#">Panel 1</a></dt>
<dd>Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.</dd>
<dt><a href="#">Panel 2</a></dt>
<dd>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque felis.</dd>
<dt><a href="#">Panel 3</a></dt>
<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi. Sed pretium, ligula sollicitudin laoreet viverra, tortor libero sodales leo, eget blandit nunc tortor eu nibh. Nullam mollis. Ut justo. Suspendisse potenti.</dd>
@renatorib
renatorib / 1.HowUse.md
Last active August 29, 2015 14:02
CakePHP ArraySort Utility

CakePHP ArraySort Utility

Instalation

Paste the file in app/Utility/ArraySort.php Remember, the file must be in app/Utility folder

Usage

Tinder API documentation

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

@renatorib
renatorib / _buttons.scss
Last active August 29, 2015 14:09
SASS UI
// @import 'colors';
$dark: #333333;
$light: #ecf0f1;
$green: #2ecc71;
$red: #c0392b;
/*********************
* Mixins
*********************/
@renatorib
renatorib / gesiorapi.js
Created February 25, 2015 18:56
Gesior API
var request = require('request');
module.exports = function(site){
this.site = site;
this.cookiejar = request.jar();
var self = this;
// Request Wrapper
@renatorib
renatorib / Cash.php
Last active August 29, 2015 14:24
Printi Test - Class Cash - Minimum notes algorithm
<?php
class Cash {
/**
* Get plain available notes and his quantity (true = infinite)
* Example:
* '100' => 20 // Available 20 notes of 100
* '100' => true // Available infinite notes of 100
*
* @return array
@renatorib
renatorib / generateToken.php
Last active August 29, 2015 14:24
Function to Generate Token by length
function generateToken($length = 20, $chars = 'abcdefghijklmnopqrstuvxwyzABCDEFGHIJKLMNOPQRSTUVXWYZ1234567890'){
$return = '';
while($length > 0){
$return .= $tokens[rand(0, strlen($chars)-1)];
$length--;
}
return $return;
}