Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// Simple, single configuration file to override almost all paths and server settings. As used by @airways | |
// and @litzinger. | |
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that | |
// local users and each instance (staging, production) can have their own settings. | |
// These config files are mainly meant to be used on a shared development server used by all developers, | |
// although it works almost as well for local development as well. |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
#!/bin/bash | |
# Script for placing sudoers.d files with syntax-checking | |
# Making a temporary file to contain the sudoers-changes to be pre-checked | |
TMP=$(mktemp -t vagrant_sudoers) | |
cat /etc/sudoers > $TMP | |
cat >> $TMP <<EOF | |
# Allow passwordless startup of Vagrant when using NFS. | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports |
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Go to vmware vm files:
cd /path/to/vagrant-vm/.vagrant/machines/default/vmware_fusion/some-random-string
Defragment vm disk:
/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -d Virtual\ Disk.vmdk
Shrink vm disk:
/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -k Virtual\ Disk.vmdk
#Some discussions on logging from docker: Using logstash Using Papertrail
A lot of this boils down to whether you want a single or multi-process (systemd, supervisord etc.) container...
- name: Install Packages Needed To Compile PHP 7 | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- git | |
- autoconf | |
- bison | |
- libxml2-dev | |
- libbz2-dev | |
- libmcrypt-dev | |
- libcurl4-openssl-dev |
TL;DR: I explain how to detect TLS 1.0 connections and, by way of custom headers, warn the user about the coming change to more modern TLS versions.