Skip to content

Instantly share code, notes, and snippets.

@mwangaben
mwangaben / Git push deployment in 7 easy steps.md
Created May 20, 2018 22:10 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@mwangaben
mwangaben / git-deployment.md
Last active May 20, 2018 22:37 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@mwangaben
mwangaben / _ide_helper.php
Created May 28, 2018 13:14 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
import _ from 'lodash';
class MyForm {
constructor(defaults = null) {
this.error = {};
this.defaults =defaults
if(this.defaults){
Object.assign(this, this.defaults);
}
}
@mwangaben
mwangaben / Response.php
Created November 12, 2019 01:52 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@mwangaben
mwangaben / NginxReloadBug
Created June 14, 2020 03:03 — forked from sun4lower/NginxReloadBug
nginx: [error] invalid PID number "" in "/var/run/nginx.pid"
pkill -9 nginx
nginx -c /etc/nginx/nginx.conf
nginx -s reload
@mwangaben
mwangaben / nginx-boringssl-build-script-debian.sh
Created July 3, 2020 11:59 — forked from neilstuartcraig/nginx-boringssl-build-script-debian.sh
This builds NGINX from source with BoringSSL for Debian (alike?) systems with systemd (e.g. Debian Jessie)
#!/bin/bash
LATESTNGINX="1.11.10"
BUILDROOT="/tmp/boring-nginx"
# Pre-req
sudo apt-get update
sudo apt-get upgrade -y
# Install deps
<script type="application/ld+json">{
"@context":"http://schema.org",
"@type":"ItemList",
"itemListElement":[
{
"@type": "SiteNavigationElement",
"position": 1,
"name": "Sign Up",
"description": "Create your example profile.",
"url":"https://example.com"
@mwangaben
mwangaben / paginate.php
Created May 24, 2021 15:56 — forked from vluzrmos/paginate.php
Laravel Paginate Collection or Array
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
@mwangaben
mwangaben / machine.js
Last active August 7, 2021 11:54
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions