This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
interface Fullstory { | |
identify(uid: string): void; | |
setUserVars(userVars: object): void; | |
getCurrentSessionURL(): string; | |
log(msg: string); | |
log(level: string, msg: string); | |
shutdown(); | |
restart(); | |
consent(consent: boolean); | |
} |
// Note: only for modern browser | |
import axios from 'axios' | |
// helper function: generate a new file from base64 String | |
const dataURLtoFile = (dataurl, filename) => { | |
const arr = dataurl.split(',') | |
const mime = arr[0].match(/:(.*?);/)[1] | |
const bstr = atob(arr[1]) | |
let n = bstr.length | |
const u8arr = new Uint8Array(n) |
#!/bin/bash | |
# Variable that will hold the name of the clang-format command | |
FMT="" | |
# Some distros just call it clang-format. Others (e.g. Ubuntu) are insistent | |
# that the version number be part of the command. We prefer clang-format if | |
# that's present, otherwise we work backwards from highest version to lowest | |
# version. | |
for clangfmt in clang-format{,-{4,3}.{9,8,7,6,5,4,3,2,1,0}}; do |
<?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; |
<?php | |
$apnsHost = 'gateway.sandbox.push.apple.com'; | |
$apnsCert = 'ck.pem'; | |
$apnsPort = 2195; | |
$apnsPass = '<PASSWORD_GOES_HERE>'; | |
$token = '<DEVICE_TOKEN_GOES_HERE>'; | |
$payload['aps'] = array('alert' => 'Oh hai!', 'badge' => 1, 'sound' => 'default'); | |
$output = json_encode($payload); |
This is the process and standard that I use for the vast majority of my Laravel code bases and projects.
For more information about php-cs-fixer visit the project repository: FriendsOfPHP/PHP-CS-FIXER.
Add the following .php_cs
file to the root of your project.
.php_cs
class Car { | |
constructor(doors = 4, state = "brand new", color = "silver") { | |
this.doors = doors | |
this.state = state | |
this.color = color | |
} | |
} | |
class Truck { |
You want to set up your Raspberry Pi without monitor and keyboard. This is sometimes called "headless". Don't worry, you'll keep your head if you follow these step-by-step instructions (however, see license and disclaimer below). We will install the Raspbian operating system and configure the Pi WiFi from a Terminal session on a Mac.
You have:
default: | |
extensions: | |
Behat\MinkExtension: | |
base_url: http://localhost:8000 | |
default_session: selenium2 | |
selenium2: | |
browser: chrome | |
wd_host: http://127.0.0.1:4444/wd/hub | |
capabilities: | |
chrome: |