Skip to content

Instantly share code, notes, and snippets.

View gabrielkoerich's full-sized avatar
🎯
Focusing

Gabriel Koerich gabrielkoerich

🎯
Focusing
View GitHub Profile
<script src="//app.bulldesk.com.br/forms.js"></script>
<script>
new BulldeskFormIntegration({
token: '1f57055247e479ab2185b87ab8441678',
identifier: 'Formulário de Contato',
validate: true,
map: {
'wysija[user][email]': 'email',
}
});
@gabrielkoerich
gabrielkoerich / first.php
Created May 24, 2018 08:49
Refactoring to events
<?php
(...)
class WebhookController extends Controller
{
public function handleWebhook(Request $request)
{
$payload = json_decode($request->getContent(), true);
if (! $this->isInTestingEnvironment() && ! $this->eventExistsOnStripe($payload['id'])) {
<?php
namespace App\Http\Middleware;
use App;
use Closure;
class ConfigureCloudFlare
{
/**
@gabrielkoerich
gabrielkoerich / integration.php
Created January 10, 2017 21:17
Bulldesk PHP integration
<?php
function input($name)
{
if (isset($_POST[$name])) {
return $_POST[$name];
}
}
function post($url, $data)
@gabrielkoerich
gabrielkoerich / gulpfile.js
Created July 27, 2016 14:05
Package.json and Gulpfile.js used in laravel projects
'use strict';
var del = require('del');
var gulp = require('gulp');
var elixir = require('laravel-elixir');
require('laravel-elixir-vueify');
var path = {
public: './public/',
# nginx Configuration File
# http://wiki.nginx.org/Configuration
# Run as a less privileged user for security reasons.
user forge;
# How many worker threads to run;
# "auto" sets it to the number of CPU cores available in the system, and
# offers the best performance. Don't set it higher than the number of CPU
# cores if changing this parameter.
@gabrielkoerich
gabrielkoerich / Preferences.sublime-settings
Last active September 29, 2016 16:59
Sublime settings
{
"always_show_minimap_viewport": true,
"caret_style": "smooth",
"color_scheme": "Packages/Material Theme/schemes/OLD/Material-Theme.tmTheme",
"color_scheme_old": "Packages/User/SublimeLinter/GitHub (SL).tmTheme",
"detect_indentation": false,
"folder_exclude_patterns":
[
".git",
".hg",