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 | |
function callAPI($method, $url, $data, $headers = false){ | |
$curl = curl_init(); | |
switch ($method){ | |
case "POST": | |
curl_setopt($curl, CURLOPT_POST, 1); | |
if ($data) | |
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); |
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 | |
public function admin_add() { | |
$this->layout="Adm.admin"; | |
$plans = $this->Income->Plan->find('list',array( | |
'fields'=>array( | |
'Plan.id','Plan.nome' | |
), | |
'order'=>array( |
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 | |
$avaliacoes = $this->relatoriosM->desempenho_consolidado($_POST); | |
$zip = new ZipArchive(); | |
$zip->open($_SERVER['DOCUMENT_ROOT'].'/uploads/relatorio.zip', ZipArchive::CREATE); | |
if($zip->open($_SERVER['DOCUMENT_ROOT'].'/uploads/relatorio.zip')){ | |
foreach ($avaliacoes as $key => $avaliacao) { | |
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 | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
DEFINE('SERVIDOR', 'dominio.com.br'); | |
DEFINE('PORTA', '143'); | |
DEFINE('USUARIO', '[email protected]'); | |
DEFINE('SENHA', 'senha'); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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.controllers', []) | |
.controller('AppCtrl', function($scope) { | |
}) | |
.controller('TiposCtrl', function($scope) { | |
}) |
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('Estrutura', function($http, $q) { | |
var json = $http.get('/json/process.json'); | |
return { | |
all: function() { |
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', | |
{ |
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
{ | |
"name": "helloword", | |
"version": "1.0.0", | |
"description": "", | |
"main": "main.js", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"author": "Caio Norder <[email protected]>", | |
"license": "MIT", |