View matrixloop.twig
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
{% for block in entry.pageBuilder %} | |
{% switch block.type %} | |
{% case block.type %} | |
{% include "pages/_parts/_" ~ block.type ~ ".twig" %} | |
{% endswitch %} | |
{% endfor %} |
View ExpressionEngine mysql password reset
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
UPDATE exp_members | |
SET password = SHA1('pass123') | |
WHERE member_id = 1 |
View gist:592234bedcb3893bf0f096d83282aba4
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
# | |
brew tap exolnet/homebrew-deprecated | |
brew install php@5.6 |
View craft_general.php
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 | |
return array( | |
'domain.com' => array( | |
//'devMode' => true, | |
'omitScriptNameInUrls' => true, | |
'environmentVariables' => array( | |
'siteUrl' => 'http://domain.com/', | |
'fileSystemPath' => '', | |
) |
View craft_db.php
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 | |
if ($_SERVER['SERVER_NAME'] == 'local.sitename') | |
{ | |
return array( | |
'server' => 'localhost', | |
'user' => 'user', | |
'password' => 'password', | |
'database' => 'database', | |
'tablePrefix' => 'craft', |
View prodDbSync.sh
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 | |
# Big thanks to @sam_h for this! Works like a charm. | |
# | |
# This script assumes you have ssh access to a remote server | |
# Both databases are backed up to sql files in the same directory | |
# this script is executed from. | |
# Usage: | |
# 1. Make sure this file is executable with `chmod +x mysqlsync` | |
# 2. Set the credentials for the variables at the top |
View gist:b6135b5e525d32da553d
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
git remote set-url origin git@github.com:user/repo.git |
View Gulp
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
var gulp = require('gulp'), | |
less = require('gulp-less'), | |
livereload = require('gulp-livereload'), | |
notify = require('gulp-notify'); | |
minifycss = require('gulp-minify-css'); | |
gutil = require('gulp-util'); | |
gulp.task('less', function() { | |
return gulp.src(['../blog/css/*.less'], {base: '../blog/css/'}) | |
.pipe(less().on('error', function(err){ |