Skip to content

Instantly share code, notes, and snippets.

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

Sergei Filippov sergeifilippov

:octocat:
👍🏻
View GitHub Profile
.~~. .~~.
'. \ ' ' / .'
.~ .~~~..~.
: .~.'~'.~. :
~ ( ) ( ) ~
( : '~'.~.'~' : )
~ .~ ( ) ~. ~
( : '~' : ) Raspberry Pi
'~ .~~~. ~'
'~'
@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

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

<VirtualHost *:80>
ServerName magento.loc
DocumentRoot /var/www/html
DirectoryIndex index.php
<Directory /var/www/html/var/>
Order deny,allow
Deny from all
</Directory>
@sergeifilippov
sergeifilippov / poseidon-art
Created July 30, 2013 22:31
poseidon ascii art
|||
\|/
| WWW o
| /_^_\ O )
B, /|o o\\_ (
|\\ |\ - |\\_/ o ) <*)<
| \\\_/= \_/ <^)< (
| `\ \\
| | .][. | )
| \ | /( ) o (
@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 / 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
#!/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`

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
@sergeifilippov
sergeifilippov / domain-nginx.conf
Created February 10, 2014 03:22
linux-dash with nginx
server {
server_name $domain_name;
root /var/www;
index index.html index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Cache static files for as long as possible
location ~* \.(?:xml|ogg|mp3|mp4|ogv|svg|svgz|eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico)$ {
try_files $uri =404;