Skip to content

Instantly share code, notes, and snippets.

@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"}
@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"
    }
}'
View gist:0b0f2b39732d67dca410eeb82f2480e8

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@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

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'));
You can’t perform that action at this time.