Skip to content

Instantly share code, notes, and snippets.

View package.json
{
"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",
View gist:303e45b9b70bd8d97839d949dd66c026
<?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']);
View gist:b7107e30655f966715efd2aa3f29e52f
$x = SendSMS("127.0.0.1", 8800, "", "", $_POST['txtTELEFONE'], $_POST['txtMENSAGEM']);
echo $x;
View gist:6382cfe30e40a6a2e34d2e89b4f8d586
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 Jan 29, 2021
How to install ffmpeg on Amazon Linux rhel fedora
View gist:971e7173016843cf105517dbc53b881f
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
View gist:e19374a23cfbdd4ac4f06618fcdf02af
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
@samhk222
samhk222 / teste.php
Created Sep 20, 2019
Página para fazer o teste do card 327- Dashboard Cotar
View teste.php
<!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 Jun 17, 2019
Docker + xdebug +Vscode
View Dockerfile
COPY 15-xdebug.ini /etc/php-7.1.d/15-xdebug.ini
@samhk222
samhk222 / Preparando o projeto.bash
Last active Dec 28, 2018
Laravel Faker Tutorial
View Preparando o projeto.bash
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 Dec 27, 2018
Create a composer package
View Parser.php
<?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