Skip to content

Instantly share code, notes, and snippets.

@cezaraugusto
cezaraugusto / gpg_fix.txt
Last active August 3, 2024 16:53
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@joshkoenig
joshkoenig / server_name_and_port.php
Created April 10, 2015 19:58
SERVER_NAME and SERVER_PORT woes
<?php
/**
* Problem: there's code out there that relies on $_SERVER['SERVER_NAME'] and sometimes $_SERVER['SERVER_PORT']
* to construct urls, either to "call itself" or to create urls that are passed to third parties and expect to
* be routed back.
*
* This doesn't work well on Pantheon because the environmental data will be for ephemeral container data.
*
* In general, you don't want your code to rely on this, but if you are using some piece of contrib you may
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active August 12, 2024 10:45
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@joshkoenig
joshkoenig / pantheon_mass_update.php
Last active August 29, 2015 14:07
This is a simple PHP script that allows you to use Pantheon's Terminus CLI to update all your Drupal 7 sites. You can edit it if you would like to only deploy to the test env and double-check there.
<?php
// YOUR LOGIN INFO HERE:
$email = '';
$password = '';
// RUNNING IT FOR A PANTHEON ONE "ORGANIZATION": UNCOMMENT AND ADD YOUR UUID HERE
// $organiztion_uuid = 'some-org-uuid-here';
// helper function
function terminus_json($command) {
@grugq
grugq / gist:03167bed45e774551155
Last active August 10, 2024 22:42
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@iamEAP
iamEAP / nightly_workflow.sh
Last active November 3, 2015 10:21
Keep Pantheon test environment up-to-date and squeeky clean
#!/bin/bash
PSITE='your-site-name'
PUUID='aaaaaaaa-1111-bbbb-2222-cccccccccccc'
PEMAIL='your-email@example.com'
PPASS='your-password-here--i-know'
# Authenticate with Terminus
drush pauth $PEMAIL --password=$PPASS
@iamEAP
iamEAP / .travis.yml
Last active January 20, 2023 09:23
Template for integrating Travis-CI and Pantheon Multidev
language: php
#
# Important to note, this is the version of PHP used to run this build, not the
# one used to run your Drupal installation. Ensure compatibility with the Drush
# and Terminus versions you're using for this build.
#
php:
- 5.3
@davidneedham
davidneedham / patches.txt
Last active December 26, 2015 00:09
sites/all/patches.txt This document is used to outline what patches have been applied to core, modules or themes on this website. For more information, please check out http://www.jenlampton.com/blog/sustainable-development-workflow-patching.
This document is used to outline what patches have been applied to core,
modules or themes on this website. For more information, please check out
http://www.jenlampton.com/blog/sustainable-development-workflow-patching.
Core patches:
===============
@skwashd
skwashd / settings.php
Created October 4, 2013 03:12
It is very useful to have different Drupal configurations in different environments. The easiest way to do this is via setting values in the $conf array in settings.php. For my site builds I generally create a sites/default/config directory that contains the per environment settings. When working with Acquia Cloud and Pantheon the db credentials…
<?php
/**
* Example settings.php which supports per environment configs on different hosting platforms.
*/
$include = '';
// Pantheon
if (isset($_SERVER['PANTHEON_ENVIRONMENT'])) {
$include = __DIR__ . "/config/settings.{$_SERVER['PANTHEON_ENVIRONMENT']}.php";
}
@konklone
konklone / ssl.rules
Last active May 19, 2024 18:02
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {