View change_context.txt
## immediate changes
chcon -Rv --type=httpd_sys_content_t file-name
## persistent changes
semanage fcontext -a -t httpd_sys_script_exec_t 'docroot(/.*)?'
restorecon -RFv docroot/
View git-commit-comments
git config core.commentChar ";"
View metadata.json
{
"name": "jeff1evesque/trusty64",
"description": "Ubuntu 14.04 LTS 64Bit",
"versions": [
{
"version": "1.0.0",
"providers": [
{
"name": "virtualbox",
"url": "https://atlas.hashicorp.com/jeff1evesque/boxes/trusty64/versions/1.0.0/providers/virtualbox.box",
View validate-puppet.sh
vagrant@vagrant-ubuntu-trusty-64:~$ puppet apply -e 'notify { "something@%/ok.*": }'
Notice: Compiled catalog for vagrant-ubuntu-trusty-64.home in environment produc
tion in 0.03 seconds
Notice: something@%/ok.*
Notice: /Stage[main]/Main/Notify[something@%/ok.*]/message: defined 'message' as
'something@%/ok.*'
Notice: Applied catalog in 0.01 seconds
View ssh-into-docker.sh
# step 1: build container
$ docker build -f docker/redis.dockerfile -t <image-alias> .
# step 2: run container
$ docker run -dt --name <container-name> <image-alias>
# step 3: unix based
$ docker exec -it <container-name> bash
root@cdaa90138643:/#
View interactive-docker.sh
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\Jeff\.docker\machine\cache\boot2docker.iso to C:\User
s\Jeff\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to configure a dhcp server. Somet
imes, such confirmation window is minimized in the taskbar.
View ensure_tables
# ensure missing sql tables exist
$ drush ev 'foreach(drupal_get_schema() as $name => $schema) if(!db_table_exists($name)) db_create_table($name, $schema)'
# update database schema
$ drush updatedb
View style.yml
# Default application configuration that all configurations inherit from.
scss_files: "**/*.scss"
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
# installed)
plugin_gems: []
# Default severity of all linters.
View gist:675b0d80845741a7d4b6
# install module into my home dir
% puppet module install puppetlabs/inifile
Notice: Preparing to install into /home/rip/.puppetlabs/etc/code/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/rip/.puppetlabs/etc/code/modules
└── puppetlabs-inifile (v1.5.0)
# grab a throw away php.ini
% cp /etc/php.ini ~
View gist:4540da7f91ad884d6ebc
// date to convert
$date_string = 'Thursday, July 9, 2015 - 14:54'
// conversion logic
$time = str_replace(' - ', ' ', $date_string);
$epoch = strtotime($time);
// converted unix time
var_dump($epoch);