Skip to content

Instantly share code, notes, and snippets.

Max Castro kaioken

Block or report user

Report or block kaioken

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kaioken
kaioken / .php_cs
Last active May 3, 2020
MC PHP-CS-Fixer configuration file.
View .php_cs
<?php
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
@kaioken
kaioken / elastic-cluster-settings.md
Last active Dec 29, 2019
AWS Elasticsearch Update Settings
View elastic-cluster-settings.md
curl --location --request PUT 'https://elasticclustre.amazonaws.com/_cluster/settings'  -H 'Content-Type: application/json' \
--data '{
    "persistent": {
        "action.auto_create_index": "true"
    }
}'
@kaioken
kaioken / wp_post_migration.php
Last active Sep 9, 2019
Wordpress Post Migration
View wp_post_migration.php
<?php
/**
* Wordpress migration from another wordpress site via its API
*/
$path = '/home/websitefolder/public';
$wordpressUrl = 'https://migratingwordpresssite.com';
$redisHost = '127.0.0.1';
View install-rabbitmq-centos-7.md

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

@kaioken
kaioken / cloudSettings
Last active May 24, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-05-24T20:33:13.238Z","extensionVersion":"v3.4.3"}
View .php_cs
<?php
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
@kaioken
kaioken / postmortem.md
Created Jan 17, 2019 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491
View postmortem.md

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@kaioken
kaioken / mailgunreport.php
Last active Nov 5, 2018
Mailgun Report via API using PHP
View mailgunreport.php
<?php
require_once __DIR__ . '/../vendor/autoload.php';
/**
* Get mailgun report
*
* @param string $url
* @return array
*/
@kaioken
kaioken / service.php
Created Oct 27, 2018
PhalconPHP Sentry.io Integration with Monolog
View service.php
<?php
/**
* System Log using monolog
*/
$di->set('log', function ($file = 'debug') use ($config, $di) {
// Create the logger
$logger = new MonoLogger('GEWAER.API');
$client = new Raven_Client('https://' . getenv('SENTRY_RPOJECT_SECRET') . '@sentry.io/' . getenv('SENTRY_PROJECT_ID'));
@kaioken
kaioken / GitConfigHttpProxy.md
Created Oct 10, 2018 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy
View GitConfigHttpProxy.md

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

You can’t perform that action at this time.