Skip to content

Instantly share code, notes, and snippets.

@pherum
pherum / CreateTrigger.php
Created October 11, 2018 07:47 — forked from me-shaon/CreateTrigger.php
Sample Laravel migration to create MySQL Trigger
<?php
use Illuminate\Database\Migrations\Migration;
class CreateTrigger extends Migration
{
public function up()
{
DB::unprepared('
CREATE TRIGGER tr_after_main_insert AFTER INSERT ON `main` FOR EACH ROW
image: ubuntu:zesty
services:
- mariadb
variables:
MYSQL_DATABASE: smsclub_old
MYSQL_ROOT_PASSWORD: root
before_script:
@pherum
pherum / iterm2-solarized.md
Created November 16, 2018 04:05 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@pherum
pherum / Xdebug_Valet_PHPStorm.md
Created November 21, 2018 08:30 — forked from marcandreappel/Xdebug_Valet_PHPStorm.md
Xdebug on Valet with PHPStorm

Xdebug on Valet with PHPStorm

Installation

Install homebrew → https://brew.sh

Install beforehand NginX, MariaDB, DnsMasq and PHP7.2 with Composer

$ brew install php nginx mariadb dnsmasq composer
@pherum
pherum / gist:9dcbc4d898faaa8058f78886f1566522
Created December 3, 2018 22:25 — forked from adamstac/gist:7462202
Install and configure Sendmail on Ubuntu

Install and configure Sendmail on Ubuntu

This should help you get Sendmail installed with basic configuration on Ubuntu.

  1. If sendmail isn't installed, install it: sudo apt-get install sendmail
  2. Configure /etc/hosts file: nano /etc/hosts
  3. Make sure the line looks like this: 127.0.0.1 localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart
@pherum
pherum / generate-ssh-key.sh
Created December 14, 2018 03:02 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@pherum
pherum / git --no-ff settings.txt
Created January 15, 2019 08:36 — forked from zeuxisoo/git --no-ff settings.txt
How do I make git merge's default be --no-ff --no-commit?
git config --global user.name "Your Name"
git config --global core.mergeoptions "--no-ff"
@pherum
pherum / README.md
Created July 28, 2019 18:52 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
<div id="page-container" class="page-header-dark main-content-boxed">
<!-- Header -->
<header id="page-header">
<!-- Header Content -->
<div class="content-header">
<!-- Left Section -->
<div>
<!-- Logo -->
<a class="font-size-lg text-dual" href="/">
@pherum
pherum / macosx-install-php-oracle-oci8-pdo_oci.md
Created October 2, 2019 07:29 — forked from alexbonhomme/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew