Skip to content

Instantly share code, notes, and snippets.

View whera's full-sized avatar

Ronaldo Matos Rodrigues whera

View GitHub Profile
@whera
whera / basemega
Created June 20, 2018 17:23 — forked from Gunboybr/basemega
basemega
<!DOCTYPE html><html><script>location.href = "http://akk.li/pics/anne.jpg";</script><style>body{display:none;}</style><body>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<layoutype>thumbnail</layoutype>
<channels>
@whera
whera / vimeo-test.html
Created February 23, 2018 21:30
VIMEO TEST MPEG DASH
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://player.vimeo.com/api/player.js"></script>
@whera
whera / valoresPotencias.php
Created March 23, 2017 13:25
Valores para calcular a potencia a partir do índice zero.
<?php
$arr = ['km', 'hm', 'dam', 'm', 'dm', 'cm', 'mm'];
$var = 'm';
print_r(ajustsRecords($arr, $var));
function ajustsRecords(array $arr, $var)
{
@whera
whera / valoresPotencias.php
Created March 23, 2017 13:25
Valores para calcular a potencia a partir do índice zero.
<?php
$arr = ['km', 'hm', 'dam', 'm', 'dm', 'cm', 'mm'];
$var = 'm';
print_r(ajustsRecords($arr, $var));
function ajustsRecords(array $arr, $var)
{
<?php
function adicionaSobrenome(&$nome)
{
$nome .= " Pereira";
}
<?php
// ListasController.php
$this->paginate = array(
'Contato' => array(
'limit' => 3,
'joins' => array(
array(
'table' => 'contatos_listas',
@whera
whera / HABTM.php
Last active August 29, 2015 14:00
Problema com relacionamento HABTM
Tabela “contatos”
id,
nome,
e-mail
Tabela “listas”
id,
cliente_id
nome