Skip to content

Instantly share code, notes, and snippets.

Randy Fay rfay

Block or report user

Report or block rfay

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rfay
rfay / gist:8cd633f3d0b7722da3bea044c69085d1
Created Sep 17, 2019
Build php 5.3 on recent Ubuntu
View gist:8cd633f3d0b7722da3bea044c69085d1
# 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 Aug 22, 2019
Starting ssh-agent just once (like on windows) wherever something isn't starting it for you
View .bash_sshagent
#!/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 Aug 7, 2019
ddev enable_xdebug and disable_xdebug commands - put these in .ddev/commands/web
View disable_xdebug
#!/bin/bash
## Description: Disable xdebug
## Usage: disable_xdebug
## Example: ddev disable_xdebug
export PATH=$PATH:/usr/sbin
disable_xdebug
View gist:ba875e761ae41d86c433fbe4f4259d1c
$ sudo apt-get install rkt
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
rkt
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 72.5 MB of archives.
After this operation, 85.1 MB of additional disk space will be used.
Err:1 https://download.opensuse.org/repositories/home:/rfay/Debian_9.0 ./ rkt 1.6.0-0
View check_in_path
package main
import (
"fmt"
"path/filepath"
)
func main() {
matches, _ := checkForFileInSubdirs(".", "junk.txt")
fmt.Printf("Matches for 'junk.txt: %v\n", matches)
View Gopkg.lock
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
digest = "1:6da51e5ec493ad2b44cb04129e2d0a068c8fb9bd6cb5739d199573558696bb94"
name = "github.com/Azure/go-ansiterm"
packages = [
".",
"winterm",
View gist:f6b576d4aa0536e637604647652804ae
composer install
Loading composer repositories with package information
The "https://composer.typo3.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
https://composer.typo3.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)
@rfay
rfay / d8test_setup.sh
Created Mar 18, 2018
Experimental setup of Drupal 8 testing for ddev
View d8test_setup.sh
#!/bin/bash
# This script runs inside the ddev web container and sets up Drupal 8 testing.
# It assumes a regular Drupal 8 checkout, with the docroot in the project root.
# It can be added to the config.yaml as a step to automatically happen on start
# - Run this manually with "ddev exec ./d8test_setup.sh"
# - Run this in the container (after "ddev ssh) by just running "./d8test_setup.sh"
# - Run it automatically run on start by adding it to the project's config.yaml:
#hooks:
@rfay
rfay / f-117628-7092-1a3fldf.fmkmbtvs4i
Created Jul 29, 2017
Example generated (untouched) schtasks xml file
View f-117628-7092-1a3fldf.fmkmbtvs4i
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2017-07-29T02:48:29.015Z</Date>
<Author>DESKTOP-NGH86C2\rfay</Author>
<URI>\surf-windows-ddev3</URI>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
View gist:2d8c92095cfe2cbf9d341a8fc37b6f45
$ git diff
diff --git a/cmd/ddev/cmd/start.go b/cmd/ddev/cmd/start.go
index 4c0ce0c..4e26895 100644
--- a/cmd/ddev/cmd/start.go
+++ b/cmd/ddev/cmd/start.go
@@ -73,7 +73,7 @@ func init() {
StartCmd.Flags().StringVarP(&dbImage, "db-image", "", "", "Change the image used for the app's database server")
StartCmd.Flags().StringVarP(&webImageTag, "web-image-tag", "", "", "Override the default web image tag")
StartCmd.Flags().StringVarP(&dbImageTag, "db-image-tag", "", "", "Override the default web image tag")
- StartCmd.Flags().StringVarP(&plugin, "plugin", "p", "legacy", "Choose which plugin to use")
You can’t perform that action at this time.