Skip to content

Instantly share code, notes, and snippets.

View caionorder's full-sized avatar
🚀

Caio Norder caionorder

🚀
View GitHub Profile
<?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);
<?php
public function admin_add() {
$this->layout="Adm.admin";
$plans = $this->Income->Plan->find('list',array(
'fields'=>array(
'Plan.id','Plan.nome'
),
'order'=>array(
<?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) {
<?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');
@caionorder
caionorder / 0_reuse_code.js
Created January 18, 2017 10:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
angular.module('starter.controllers', [])
.controller('AppCtrl', function($scope) {
})
.controller('TiposCtrl', function($scope) {
})
angular.module('starter.services', [])
.factory('Estrutura', function($http, $q) {
var json = $http.get('/json/process.json');
return {
all: function() {
window.fbAsyncInit = function() {
FB.init({
appId : '1791499064407302',
xfbml : true,
version : 'v2.7'
});
FB.api(
'/874332389305736/feed',
'GET',
{
const {app, BrowserWindow} = require('electron')
let win
function createWindow(){
win = new BrowserWindow({
width:800,
height:600
});
{
"name": "helloword",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "electron ."
},
"author": "Caio Norder <[email protected]>",
"license": "MIT",