This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>'+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.");"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Tarefa extends AppModel{ | |
public $name = 'Tarefa'; | |
public $belongsTo = array('Cliente','User'); | |
} |