Skip to content

Instantly share code, notes, and snippets.

View rfay's full-sized avatar

Randy Fay rfay

View GitHub Profile
@rfay
rfay / testddev.sh
Last active December 2, 2020 17:27
testddev.sh - simple way to see if ddev is working
#!/bin/bash
# Please run this script with "bash testddev.sh"
# You can copy and paste it (make a file named testddev.sh)
# Or use curl or wget to download the *raw* version.
# If you're on Windows (not WSL2) please run it in a git-bash window
# When you are reporting an issue, please include the full output of this script.
# If you have NFS enabled globally, please temporarily disable it with
# `ddev config global --nfs-mount-enabled=false`
#!/bin/bash
set -x
set -eu -o pipefail
if ! command -v go; then brew install golang; fi
if [ ! -d ./ddev/.git ]; then git clone https://github.com/drud/ddev; fi
pushd ddev
make
@rfay
rfay / repro.sh
Created April 12, 2020 21:02
Try to repro slow docker sync volume behavior
#!/bin/bash
mountdir=/mnt/testdir
touch f{1..10000}.txt
c1=$(docker run -d --rm -v "/$PWD:$mountdir" -w /$mountdir debian sleep 60)
c2=$(docker run -d --rm -v "/$PWD:$mountdir" -w /$mountdir debian sleep 60)
docker exec -w /$mountdir $c1 bash -c "echo -n 'files found inside before removal: ' && echo f*.txt | wc -w"
docker stop -t0 $c1
fyneApp := fapp.New()
window := fyneApp.NewWindow("DDEV-Local")
s := fyne.NewSize(1, 0)
nameLabel := widget.NewLabel("Project")
nameLabel.Resize(s)
nameCol := []fyne.CanvasObject{nameLabel}
typeCol := []fyne.CanvasObject{widget.NewLabel("Type")}
locCol := []fyne.CanvasObject{widget.NewLabel("Location")}
@rfay
rfay / docker-compose.yaml
Created February 3, 2020 18:21
ddev-generated docker-compose.yaml (from .ddev dir) for Docker Desktop v2.2.0.1 recreation
version: '3.6'
#ddev-generated
services:
db:
container_name: ddev-${DDEV_SITENAME}-db
build:
context: 'C:\Users\rfay\workspace\junk\.ddev\.dbimageBuild'
args:
BASE_IMAGE: $DDEV_DBIMAGE
rfay@rfay-mbp-2017:~/workspace$ mkdir my-drupal8-site
rfay@rfay-mbp-2017:~/workspace$ cd my-drupal8-site/
rfay@rfay-mbp-2017:~/workspace/my-drupal8-site$ ddev config --project-type php
Creating a new ddev project config in the current directory (/Users/rfay/workspace/my-drupal8-site)
Once completed, your configuration will be written to /Users/rfay/workspace/my-drupal8-site/.ddev/config.yaml
Found a php codebase at /Users/rfay/workspace/my-drupal8-site
Project type has no settings paths configured, so not creating settings file.
Configuration complete. You may now run 'ddev start'.
rfay@rfay-mbp-2017:~/workspace/my-drupal8-site$ ddev composer create drupal-composer/drupal-project:8.x-dev --prefer-dist
@rfay
rfay / # mingw-w64 - 2019-12-26_22-01-03.txt
Created December 27, 2019 05:06
mingw-w64 on Ubuntu 18.04.2 LTS - Homebrew build logs
Homebrew build logs for mingw-w64 on Ubuntu 18.04.2 LTS
Build date: 2019-12-26 22:01:03
@rfay
rfay / gist:8cd633f3d0b7722da3bea044c69085d1
Created September 17, 2019 13:49
Build php 5.3 on recent Ubuntu
# From https://pastebin.com/wEvpW0rg by https://github.com/RedScourge See https://github.com/drud/ddev/issues/1714#issuecomment-532015204
apt-get install -y libcurl4 curl libcurl4-openssl-dev libc-client2007e libc-client2007e-dev libssl1.1 libssl-dev \
libsnmp-dev comerr-dev krb5-multidev libgssrpc4 libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-9 libpam0g-dev libpci-dev \
libsensors4-dev libudev-dev libwrap0-dev zlib1g-dev
#php5.3 libraries/tools for compile
apt-get install -y build-essential autoconf automake autotools-dev re2c cmake cmake-data libjsoncpp1 librhash0
apt-get install -y apache2-dev libbz2-dev libssl1.0.0 bzip2-doc libapr1-dev libaprutil1-dev libexpat1-dev \
libldap2-dev libsctp-dev libsctp1 uuid-dev
apt-get install -y libedit-dev libenchant-dev libfreetype6 libfreetype6-dev enchant hunspell-en-us libbsd-dev \
@rfay
rfay / .bash_sshagent
Last active August 22, 2019 17:55
Starting ssh-agent just once (like on windows) wherever something isn't starting it for you
#!/bin/bash
#
## Auto launch of ssh-agent from
# https://help.github.com/articles/working-with-ssh-key-passphrases/#auto-launching-ssh-agent-on-git-for-windows
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
@rfay
rfay / disable_xdebug
Last active August 7, 2019 17:13
ddev enable_xdebug and disable_xdebug commands - put these in .ddev/commands/web
#!/bin/bash
## Description: Disable xdebug
## Usage: disable_xdebug
## Example: ddev disable_xdebug
export PATH=$PATH:/usr/sbin
disable_xdebug