This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sidney Dekker | |
The Field Guide to Human Error - https://amzn.to/2O30hAI | |
Just Culture - https://amzn.to/2XSsIpD | |
RULE- AND ROLE-RETREAT: AN EMPIRICALSTUDY OF PROCEDURES AND RESILIENCE - https://bit.ly/2F9is5e | |
Erik Hollnagel | |
From Safety-I to Safety-II: A White Paper - https://www.skybrary.aero/bookshelf/books/2437.pdf | |
Joint Cognitive Systems: Patterns in Cognitive Systems Engineering - https://amzn.to/2u8jhVE | |
Resilience engineering – Building a Culture of Resilience - https://bit.ly/2J8Calz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
# This assumes that composer is already installed | |
sudo mkdir -p /usr/share/composer \ | |
&& sudo composer -vvv global require drush/drush:dev-master --working-dir=/usr/share/composer \ | |
&& sudo ln -s /usr/share/composer/vendor/drush/drush/drush /usr/local/bin/drush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 spdy; | |
listen 80; | |
server_name foo.org www.foo.org; | |
root /home/site/public; | |
#if ($request_method !~ "^(GET|HEAD|POST)$" ) { return 444; } | |
if ($https != 'on') { return 301 https://www.foo.org$request_uri; } | |
if ($host = "foo.org") { return 301 https://www.foo.org$request_uri; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query = db_select('node', 'n'); | |
$string = dpq($query, TRUE); | |
dd($string); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
require 'tempfile' | |
action :ensure do | |
t_file = Tempfile.new('/root/.profile_temp') | |
::File.open(new_resource.profile, 'r') do |f| | |
f.each_line do |line| | |
if line.match(/PATH=/) | |
if ::File.readlines(new_resource.profile).grep(/:#{new_resource.path.gsub('/','\/')}/).length > 0 | |
t_file.puts line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
/** | |
* @file | |
* This is a Git pre-commit hook that informs you when you are | |
* about to commit whitespace or a debug function. | |
*/ | |
$red = "\033[1;31m"; | |
$red_end = "\033[0m"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds an #ajax property recursively to all elements of a form. | |
* | |
* @param array $element | |
* The first element to recursively apply #ajax to. | |
*/ | |
function recursive_ajax(&$element) { | |
if (element_children($element)) { | |
foreach (element_children($element) as $child) { | |
recursive_ajax($element[$child]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"general vim rc settings | |
set term=xterm-color | |
set smartcase " match 'word' case-insensitive and 'Word' case-sensitive | |
set showmatch " shows matching parenthesis, bracket, or brace | |
set showcmd " show commands while they're being typed | |
set incsearch " searches as you type | |
syntax on " syntax highlighing | |
set background=dark " adapt colors for background | |
:colorscheme desert | |
set vb t_vb= |