Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sergeifilippov's full-sized avatar
:octocat:
👍🏻

Sergei Filippov sergeifilippov

:octocat:
👍🏻
View GitHub Profile

Templating in EE vs. Craft

Lots of people have asked, so here are a few common tasks you might do in your templates, as they would be written in ExpressionEngine vs. Craft.

Table of Contents

  1. Comments
  2. Conditionals
  3. Loops
#!/bin/bash
# Reload a varnish config
# Author: Kristian Lyngstol
FILE="/etc/varnish/ugc.vcl"
# Hostname and management port
# (defined in /etc/default/varnish or on startup)
HOSTPORT="localhost:6082"
NOW=`date +%s`
@sergeifilippov
sergeifilippov / mounting-instructions.md
Created December 4, 2013 23:07
Mounting a partition/drive with out execration parameters

mount a partition with out execution enabled - for security

make a mounting point

sudo mkdir /mnt/mounting_point

find the drive to mount

sudo blkid
@sergeifilippov
sergeifilippov / alias.txt
Created August 10, 2013 22:42
Add this to your bash_profile. Now, whenever you need to fetch your ssh-key, just type sshkey, and it'll be copied to your clipboard.
alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy && echo 'Copied to clipboard.'"
@sergeifilippov
sergeifilippov / poseidon-art
Created July 30, 2013 22:31
poseidon ascii art
|||
\|/
| WWW o
| /_^_\ O )
B, /|o o\\_ (
|\\ |\ - |\\_/ o ) <*)<
| \\\_/= \_/ <^)< (
| `\ \\
| | .][. | )
| \ | /( ) o (
<VirtualHost *:80>
ServerName magento.loc
DocumentRoot /var/www/html
DirectoryIndex index.php
<Directory /var/www/html/var/>
Order deny,allow
Deny from all
</Directory>

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@sergeifilippov
sergeifilippov / gist:5062116
Created March 1, 2013 02:46
Magento Community/Enterprise .gitignore file
# OS generated files #
################################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
.~~. .~~.
'. \ ' ' / .'
.~ .~~~..~.
: .~.'~'.~. :
~ ( ) ( ) ~
( : '~'.~.'~' : )
~ .~ ( ) ~. ~
( : '~' : ) Raspberry Pi
'~ .~~~. ~'
'~'