View Craft Snippets.xml
<template name="##" value="{# $END$ #}" toReformat="false" toShortenFQNames="true">
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
<template name="%%" value="{% $END$ %}" toReformat="false" toShortenFQNames="true">
<context>
<option name="HTML_TEXT" value="true" />
View single session per user.php
<?php
craft()->on('userSession.onLogin', function($event)
{
$username = $event->params['username'];
$user = craft()->users->getUserByUsernameOrEmail($username);
if($user)
{
$user->getContent()->validSession = session_id();
craft()->users->saveUser($user);
View Craft-CMS-Basics-ep02.md

Craft CMS Basics - Install Happy Lager

Intro

In this video we will install the Craft demo site, called Happy Lager, on our own local machine. All links used in this video will be provided in the description below. So save yourself some typing and click those instead.

Tools

To run a website on our local machine we first need a web server. There are many local web server options available. For this video we'll be using MAMP Pro as that's available for both Windows and Mac. It comes with a 14 day trial, so if you want you can always install something else later. The major benefit of MAMP Pro, is that it does everything for you straight from the graphical interface. From setting up the virtual host to changing your hosts file; you never have to leave the MAMP window. This allows you to focus on learning Craft, instead of wasting precious time configuring your web server.

If you're on a budget though, then you could also consider the regular, non-pro, MAMP. This does require changing your virtual host

View db_backup.sh
#!/bin/bash
# Mail backup of all databases
# Make sure to add the from address to your contacts to by-pass any spam filters
# create a compressed dump of all databases
mysqldump -u debian-sys-maint -pPASSWORD_HERE --all-databases | gzip > /root/all-databases.sql.gz
# mail the file
mailx -r from@example.com -s "DB Backups of server x" -a /root/all-databases.sql.gz to@example.com < "."
View TitleToSettingsPanePlugin.php
<?php
namespace Craft;
class TitleToSettingsPanePlugin extends BasePlugin {
/**
* Returns the plugin’s name.
*
* @return string The plugin’s name.
*/
View Craft-HappyLager-Windows-Wamp.md

Install HappyLager demo for Windows / WampServer

While you can try Craft online at https://demo.buildwithcraft.com/, this does not give you the full development experience. Besides being a timed (48 hours) demo, you can't install any plugins or change the templates for example. For that you will have to run the HappyLager demo on your own local machine. Here's how to do that on Windows using WampServer.

Download / unzip the files

View EntryNotifierPlugin.php
<?php
namespace Craft;
/**
* Class EntryNotifierPlugin
* @package Craft
*
* Example on how to work with entry events inside a plugin.
* This can be used to notify other users whenever an entry/draft is saved for example.
*
View Podcasting.md

Acoustic Treatment

  • get some carpet on the floor. The thicker the better. I bought a high pile carpet at Ikea for about EUR 35.
  • buy some pushpins
  • buy some cheap acoustic foam at a hardware store (mine was EUR 12 per m2 for non-adhesive)
  • add the foam to at least the walls in front and to the back of you (using the pushpins if possible!)
  • I also placed a few pieces of foam below my desk (out of sight) to minimize PC fan noise
  • also place a piece of foam on your desk while recording (very important so keep at least one piece around)
  • windows cause major reverb issues. close curtains (or place some foam over them, although perhaps not very practical :-))
View all skype emoticons.txt
:) :( :D 8=) ;) :o ;( (sweat) :| :* :P (yn) (blush) :^) |-) |( (inlove) ]:) (yawn) (puke) (doh) :@ (wasntme) (party) (facepalm) :S (mm) 8-| :x (hi) (devil) (angel) (envy) (wait) (bear) (makeup) (giggle) (clap) (think) (bow) (rofl) (whew) (happy) (smirk) (nod) (shake) (emo) (y) (n) (handshake) (h) (tmi) (heidy) (f) (rain) (sun) (music) (coffee) (pizza) (cash) (muscle) (^) (beer) (d) (dance) (ninja) (*) (tumbleweed) (bandit) (skype) (call) (talk) (u) (o) (e) (~) (mp) (drunk) (punch) (smoking) (toivo) (rock) (headbang) (bug) (poolparty) (talktothehand) (idea) (sheep) (cat) (bike) (dog) (flag:AF) (flag:AL) (flag:DZ) (flag:AS) (flag:AD) (flag:AO) (flag:AI) (flag:AQ) (flag:AG) (flag:AR) (flag:AM) (flag:AW) (flag:AU) (flag:AT) (flag:AZ) (flag:BS) (flag:BH) (flag:BD) (flag:BB) (flag:BY) (flag:BE) (flag:BZ) (flag:BJ) (flag:BM) (flag:BT) (flag:BO) (flag:BA) (flag:BW) (flag:BR) (flag:IO) (flag:VG) (flag:BN) (flag:BG) (flag:BF) (flag:BI) (flag:KH) (flag:CM) (flag:CA) (flag:CV) (flag:KY) (flag:CF) (flag:TD) (flag:CL) (fla
View gist:30af5ef3b2397cedb459
server {
listen 80;
charset utf8;
root /home/user/path/to/public;
index index.php;
server_name example.com;
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/example-fpm.sock;