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
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 | |
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
<?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
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
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
# 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
{ | |
"name": "helloword", | |
"version": "1.0.0", | |
"description": "", | |
"main": "main.js", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"author": "Caio Norder <[email protected]>", | |
"license": "MIT", |
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
const {app, BrowserWindow} = require('electron') | |
let win | |
function createWindow(){ | |
win = new BrowserWindow({ | |
width:800, | |
height:600 | |
}); |
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
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : '1791499064407302', | |
xfbml : true, | |
version : 'v2.7' | |
}); | |
FB.api( | |
'/874332389305736/feed', | |
'GET', | |
{ |