Skip to content

Instantly share code, notes, and snippets.

{
"private": true,
"scripts": {
"dev": "npm run development:site && npm run development:admin",
"development:site": "cross-env NODE_ENV=development SECTION=site node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"development:admin": "cross-env NODE_ENV=development SECTION=admin node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development:site -- --watch",
"watch:admin": "npm run development:admin -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
<?PHP
/**
* Página de teste de Envio de SMS
* @author Samuel Aiala Ferreira <samuca@samuca.com>
* @version 1.0
* @package SMS
*/
if ($_POST['acao'] == 'sendsms')
{
$x = SendSMS("127.0.0.1", 8800, "", "", $_POST['txtTELEFONE'], $_POST['txtMENSAGEM']);
$x = SendSMS("127.0.0.1", 8800, "", "", $_POST['txtTELEFONE'], $_POST['txtMENSAGEM']);
echo $x;
bash-4.2# cat /etc/os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
@samhk222
samhk222 / gist:971e7173016843cf105517dbc53b881f
Created January 29, 2021 16:21
How to install ffmpeg on Amazon Linux rhel fedora
mkdir -v -p /usr/local/bin/ffmpeg
cd /usr/local/bin/ffmpeg
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz
tar -v -xf ffmpeg-release-i686-static.tar.xz --strip-components=1
rm -v -f ffmpeg-release-i686-static.tar.xz
ln -snf /usr/local/bin/ffmpeg/ffmpeg /usr/bin/ffmpeg
ln -snf /usr/local/bin/ffmpeg/ffpropbe /usr/bin/ffpropbe
@samhk222
samhk222 / gist:e19374a23cfbdd4ac4f06618fcdf02af
Created December 18, 2020 20:10
Fixing laravel monolog timezone
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
@samhk222
samhk222 / teste.php
Created September 20, 2019 17:04
Página para fazer o teste do card 327- Dashboard Cotar
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Simulação do cadastro de Cotar</title>
<!-- Bootstrap -->
@samhk222
samhk222 / Dockerfile
Last active June 17, 2019 17:24
Docker + xdebug +Vscode
COPY 15-xdebug.ini /etc/php-7.1.d/15-xdebug.ini
@samhk222
samhk222 / Preparando o projeto.bash
Last active December 28, 2018 13:53
Laravel Faker Tutorial
git clone https://github.com/samhk222/laravel-faker-tutorial
cd laravel-faker-tutorial
docker-compose up -d
# Instale as dependencias
docker exec TUT-7.2.x-webserver composer install
# Copie o arquivo .env e altere para acessar seu banco
cp public_html/.env.example public_html/.env
@samhk222
samhk222 / Parser.php
Last active December 27, 2018 13:14
Create a composer package
<?PHP
# Lembra quando fizemos o autoload dentro do composer.json, para os namespaces samhk222 dentro da pasta src ?
# precisamos declará-lo agora, senão não sera feito o autload dessa classe
namespace samhk222;
class Parser
{
public $hasJSON = false; #Indica se a string tem algum json
public $hasFaltyJSON = false; # Indica se tem json, mas com erro
public $matches = []; # Retorna os matches do json caso encontrados