Skip to content

Instantly share code, notes, and snippets.

View caionorder's full-sized avatar
🚀

Caio Norder caionorder

🚀
View GitHub Profile
# Clona o quick start do Electron
$ git clone https://github.com/electron/electron-quick-start
# Entra na pasta.
$ cd electron-quick-start
# Instala as dependencias e Inicia
$ npm install && npm start
angular.module('starter.services', [])
.factory('Ofertas', function($http, $q) {
var ofertas = {
1:{
'img':'http://fakeimg.pl/500x500/FFF/000',
'title':'Adaptador Auto Ajustavel Amanco',
'de':'de R$ 2,00',
'por':'Por R$ 1,00',
@caionorder
caionorder / getInfomation.js
Created May 5, 2016 13:26
Script para pegar eventos internacionais do site Uroweb
var lista = $('.inner');
for (i = 0; i < lista.length; i++){
var year = $(lista[i]).find('.year').html();
var day = $(lista[i]).find('.day').html();
var month = $(lista[i]).find('.month').html();
var event = $(lista[i]).find('h3 a').html();
var local = $(lista[i]).find('.event_details .c5').html();
var infos = $(lista[i]).find('.cols').html();
var layout = '<li>'+
'<table>'+
<?php
// search.php
// ControllerProductSearch
// add after before first $search
if (isset($this->request->get['min']) && isset($this->request->get['max'])) {
$range = array(
'min'=>$this->request->get['min'],
'max'=>$this->request->get['max']
);
} else {
<?PHP
class UsersController extends AppController{
use Gerencianet\Exception\GerencianetException;
use Gerencianet\Gerencianet;
public function admin_home($id=null) {
$this->layout="Adm.admin";
$this->User->recursive = 3;
function fbCallback(value) {
var statusHTML = [];
console.dir(value);
for (var i=0; i < value.data.length; i++){
var msg;
var foto = value.data[i].picture;
var link = value.data[i].link;
var saida;
<?php
$fanPageId = "607690675909650";
$token = "seutoken";
$url = "https://graph.facebook.com/v2.1/{$fanPageId}/posts?access_token={$token}&fields=message,picture,link&limit=".$_GET['q'];
$contents = file_get_contents($url);
$contents = str_replace('v\/t1.0-9\/p130x130\/','p\/t1.0-9\/s\/', $contents);
header('Content-Type: application/json');
echo "fbCallback(".$contents.");";
<?php
class Venda extends AppModel{
public $name = 'Venda';
public $belongsTo = array('User','Cliente');
public $hasMany = array('Pedido');
}
class Pedido extends AppModel{
public $name = 'Pedido';
public $belongsTo = array('User','Venda','Produto');
CREATE TABLE `tarefas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titulo` varchar(45) DEFAULT NULL,
`data_final` date DEFAULT NULL,
`conteudo` text,
`cliente_id` int(11) DEFAULT NULL,
`created_by_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`created` datetime DEFAULT NULL,
<?php
class Tarefa extends AppModel{
public $name = 'Tarefa';
public $belongsTo = array('Cliente','User');
}