Skip to content

Instantly share code, notes, and snippets.

View kimpepper's full-sized avatar

Kim Pepper kimpepper

View GitHub Profile
@LionsAd
LionsAd / CFAwareApcuBackend.php
Last active November 21, 2018 20:37
CFAwareApcuBackend -- ChainedFastAware APCu Cache backend
<?php
namespace Drupal\Core\Cache;
use Drupal\Component\Assertion\Inspector;
/**
* Stores cache items in the Alternative PHP Cache User Cache (APCu).
*/
class CFAwareApcuBackend extends ApcuBackend {
@sindresorhus
sindresorhus / .profile
Created April 6, 2016 11:10 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@joho
joho / deploy.rb
Created March 8, 2012 10:48
Fix 'Host key verification failed.' errors by using this cap task
# Add this to your capfile if you're getting burned on first deploy to a new host
# If you're getting 'Host key verification failed.' errors on your initial
# checkout of a repo using capistrano, this will fix it up
task :a_friend_of_mine_is_a_friend_of_yours do
# transfer what *I* know about github to the host
github_known_hosts_line = `cat ~/.ssh/known_hosts | grep github.com`
run "echo #{github_known_hosts_line} >> ~/.ssh/known_hosts"
end