- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
# from inside the top level project folder (ie. where .git/, Procfile, etc lives) | |
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev git python3.4 python3.4-dev -y | |
virtualenv -p python3.4 .venv && source .venv/bin/activate | |
pip install -e git+https://github.com/nephila/djangocms-installer#egg=djangocms-installer | |
pip install "django-cms<3.3" "django-treebeard>=2.0" "https://github.com/divio/djangocms-column/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-googlemap/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-inherit/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-link/archive/master.zip?1457384272.4600909" "https://github.com/divio/djangocms-style/archive/master.zip?1457384272.4600909" "easy_thumbnails" "django-filer>=0.9.12" "cmsplugin-filer>=0.10.2" "djangocms-admin-style>=1.0.6" "djangocms-text-ckeditor>=2.8.1" "Django<1.9" "pytz" "django-reversion>=1.8.7,<1.9" "django-classy-tags>=0.3.4.1" "html5lib" |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
use Drupal\Core\Url; | |
use Symfony\Component\HttpFoundation\Request; | |
function my_function() { | |
$previousUrl = \Drupal::request()->server->get('HTTP_REFERER'); | |
$fake_request = Request::create($previousUrl); | |
$url_object = \Drupal::service('path.validator')->getUrlIfValid($fake_request->getRequestUri()); | |
if ($url_object) { | |
$route_name = $url_object->getRouteName(); | |
// Do something with $route_name; |
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
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. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
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 o
This is a script to export bookmarks from the web browser Google Chrome to a users home drive in a Windows environment with clients and domain controllers. Most of the script comes from this article
Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.
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. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.
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 o
// Originally found on | |
//https://appendto.com/2017/04/use-javascript-to-export-your-data-as-csv/ | |
function convertArrayOfObjectsToCSV(args) { | |
var result, ctr, keys, columnDelimiter, lineDelimiter, data; | |
data = args.data || null; | |
if (data == null || !data.length) { | |
return null; | |
} |
var gulp = require("gulp"); | |
var sass = require("gulp-sass"); | |
var filter = require('gulp-filter'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var browserSync = require("browser-sync"); | |
var reload = browserSync.reload; | |
var shell = require('gulp-shell'); | |
// sass task | |
gulp.task('sass', function () { |
CREATE DATABASE database CHARACTER SET utf8 COLLATE utf8_general_ci; | |
CREATE USER username@localhost IDENTIFIED BY 'password'; | |
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON database.* TO 'username'@'localhost' IDENTIFIED BY 'password'; | |