Skip to content

Instantly share code, notes, and snippets.

View siliconmeadow's full-sized avatar

Richard Sheppard siliconmeadow

  • Nomensa Ltd
  • New York / Paris / Peckham
View GitHub Profile
@tsphethean
tsphethean / proxy_switch.sh
Last active August 29, 2015 13:57
Proxy switchy script
#!/bin/sh
if [[ -z "$1" ]]; then
echo "Usage: proxy_switch.sh en 1.1.1.1:8080.
proxy_switch.sh dis"
exit 2;
fi
if [[ "$1" == "en" ]]; then
export http_proxy=http://$2
Hint: Replace USER with your Aegir Octopus system (not ftp) username.
Your Aegir system username is the same as your ftp username, minus .ftp.
1. Upload or rsync full drupal root of your site to static/custom/name
2. Chmod everything with: chmod -R 775 static/custom/name
Chmod files with: chmod -R 777 static/custom/name/sites/default/files
3. Add platform in Aegir using full system path of static/custom/name
so it will be (in this case) /data/disk/USER/static/custom/name
@rfay
rfay / .gitconfig
Created April 12, 2011 04:12 — forked from schacon/.gitconfig
insteadOf Example for git.drupal.org
# Put this in your .gitconfig
[url "http://git.drupal.org/project/"]
insteadOf = "do:"
Some helpful tips/how-to related to maintaining
your code in the Aegir environment follows below:
Aegir doesn't help in maintaing modules install/upgrades,
but it allows to migrate sites between platforms,
so you have to create a new platform with new modules
versions and then migrate the site.
It is always recommended to clone the site in the
existing platform and test migration of the cloned
@jpstacey
jpstacey / db_search.php
Created June 27, 2011 11:42
Search all tables in a Drupal database using Drupal bootstrap to get a db connection
<?php
/**
* Search all Drupal database tables for a string
* Uses simple concat(), so could
* (a) have false positives through concat or
* (b) have false negatives through TEXT trimming
*/
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@drpauldixon
drpauldixon / openvpn.md
Created November 18, 2015 18:48
Run OpenVPN via Docker on port 8443
@legovaer
legovaer / .bash_profile
Created November 12, 2015 15:50
git-blame-function
# This needs to be added to your .bash_profile
##
# GIT Helpers
##
# Usage: git-blame <file>
git-blame() {
ruby ~/scripts/git-blame-colored $1 | less -R
}
@tscheckenbach
tscheckenbach / OhMyZsh+zshPowerlevel10k.sh
Last active June 2, 2023 16:09
ubuntu zsh installation with customized powerlevel theme
#!/usr/bin/env bash
echo ">>> Install Oh-My-ZSH"
sudo apt-get install -y zsh
wget http://install.ohmyz.sh -O - | zsh
#!/usr/bin/env bash
echo ">>> Install powerlevel10k theme"
git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@HardenedArray
HardenedArray / Efficient Encrypted UEFI-Booting Arch Installation
Last active October 22, 2023 12:14
An effcient method to install Arch Linux with encrypted root and swap filesystems and boot from UEFI. Multi-OS, and VirtualBox, UEFI-booting are also supported.
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems and boot from UEFI.
# Note this encrypted installation method, while perfectly correct and highly secure, CANNOT support encrypted /boot and
# also CANNOT be subsequently converted to support an encrypted /boot!!! A CLEAN INSTALL will be required!
# Therefore, if you want to have an encrypted /boot or will want an encrypted /boot system at some point in the future,
# please ONLY follow my encrypted /boot installation guide, which lives here: