This file contains 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 onCep($param) | |
{ | |
$obj = new Cliente; // create an empty object | |
$obj->fromArray( (array) $param); // load the object with data | |
if (!empty($obj->cep)) { | |
$cep = preg_replace('/\D/', '', $obj->cep); | |
$rest = @file_get_contents( | |
"https://viacep.com.br/ws/{$cep}/json/" |
This file contains 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 | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
use Illuminate\Events\Dispatcher; | |
use Illuminate\Container\Container; | |
/** | |
* Slim 3.x shipped with the Pimple container implementation and enabled the following synthax | |
*/ | |
$app = new \Slim\App([...]); |
This file contains 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
/*! | |
* Classe SagaWebSocket | |
* | |
* @author Ramon Barros [[email protected]] | |
* @date 2018-03-16 | |
* Copyright (c) 2018 Ramon Barros | |
*/ | |
/* jslint devel: true, unparam: true, indent: 2 */ | |
(function (window, $, Promise) { | |
'use strict'; |
This file contains 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
# File: ~/bash_aliases | |
# Author: Oliver Michels <[email protected]> | |
# Desc: Definition of some useful aliases for the bash | |
# Some common shortcuts for file-/directory commands | |
alias ls='ls --color=auto' | |
alias la='ls -a' | |
alias ll='ls -l' | |
alias lla='ls -la' | |
alias l='ls' |
This file contains 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
/** | |
* Emulate FormData for some browsers | |
* MIT License | |
* (c) 2010 François de Metz | |
*/ | |
/* jslint devel: true, unparam: true, quotmark: double, indent: 2 */ | |
(function(w) { | |
"use strict"; | |
if (w.FormData) { | |
return; |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <windows.h> | |
#include <conio.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <locale.h> | |
/** | |
Autor: Diego Ribeiro |
This file contains 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
#!/bin/bash | |
# | |
# Identificação dos arquivos | |
IDENTIFICA=Backup | |
# Numero de dias do ciclo de backup | |
DIAS=7 | |
# E-mail do administrador | |
[email protected] |
This file contains 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
#!/bin/bash | |
{ # This ensures the entire script is downloaded | |
ROOT_UID=0 | |
ARRAY_SEPARATOR="#" | |
OS="" | |
OS_VERSION="" | |
PROJECT="" | |
PACKAGE="" |
This file contains 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
#!/bin/bash | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |
This file contains 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
@echo off | |
CD /d \path\dir\vagrant | |
FOR /f "tokens=2 delims= " %%a in ('vagrant status ^| find /i "default"') do ( | |
SET STATE=%%a | |
) | |
IF %STATE% equ "running" ( | |
@echo Vagrant VM is running... |
NewerOlder