Skip to content

Instantly share code, notes, and snippets.

View insign's full-sized avatar
🇧🇷
being open-sourcerer

Hélio insign

🇧🇷
being open-sourcerer
View GitHub Profile
@insign
insign / watchlist.php
Created November 7, 2015 05:08
Sync IMDb watchlist to trakt.tv watchlist. Usage: php -f watchlist.php trakt_apikey trakt_username trakt_passwordhash imdb_login imdb_password imdb_uid (IMDb login is email adress or nickname, it's NOT the ur12345678 bit, that's the imdb_uid)
<?php
define('TRAKT_APIKEY', $argv[1]);
define('TRAKT_USERNAME', $argv[2]);
define('TRAKT_PASSWORD', $argv[3]);
define('IMDB_EMAIL', $argv[4]);
define('IMDB_PASSWORD', $argv[5]);
define('IMDB_UID', $argv[6]);
function curl_post($urlpre, $data, $urlpost = '')
@insign
insign / calcular.php
Created October 8, 2013 03:48
Cálculo de Prescrição (simulação)
<?php
require_once 'cdp.class.php';
$cdp = new CalculoDePrescricao;
$cdp->data_do_crime = $_POST['data_do_crime'];
$cdp->data_da_denuncia = $_POST['data_da_denuncia'];
$cdp->idade_criminoso = $_POST['idade_criminoso'];
$cdp->pena_maxima = $_POST['pena_maxima'];
@insign
insign / app\routes.php
Created September 17, 2013 06:46
Resource bug
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
<?php
class ItemsController extends BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index() {