Skip to content

Instantly share code, notes, and snippets.

View dutchmartin's full-sized avatar

Martijn Groeneveldt dutchmartin

View GitHub Profile
@yang-wei
yang-wei / README.md
Last active April 6, 2021 15:49
ES6 destructing (and rest parameter)

We will first discussed how destructing and rest parameters can be used in ES6 - in arrays and objects. Then we will look at a few examples and also discuss some quiz.

arrays

var array = [1, 2, 3, 4];
var nestedArray = [1, 2, 3, 4, [7, 8, 9]];

var [a, b, c, d] = array;
console.log(a, b, c, d)
@einkoro
einkoro / CustomWordPressValetDriver.php
Last active November 11, 2022 11:01
Custom WordPress Valet driver for installs that aren't in the root project directory
<?php
class CustomWordPressValetDriver extends WordPressValetDriver
{
/**
* Custom suffix for site path.
*
* @var string
*/
const sitePathSuffix = '/www';
@AjeetK
AjeetK / jenkins_docker.md
Created November 11, 2017 17:05
Adding jenkins User To Docker Group
DOCKER_SOCKET=/var/run/docker.sock
DOCKER_GROUP=docker
JENKINS_USER=jenkins

if [ -S ${DOCKER_SOCKET} ]; then
DOCKER_GID=$(stat -c '%g' ${DOCKER_SOCKET})
sudo groupadd -for -g ${DOCKER_GID} ${DOCKER_GROUP}
sudo usermod -aG ${DOCKER_GROUP} ${JENKINS_USER}
fi
@diedexx
diedexx / install.sh
Last active September 1, 2020 15:33
Run this to get a basic Yoast development setup
#!/usr/bin/env bash
install(){
if [ "$EUID" -eq 0 ]; then
error "This script should not be used as root"
exit
fi
info "Preparing your Mac for development"