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 | |
// 1) Escaping on; View template | |
$manufacturers = $sf_user->getAttribute('manufacturer_ids', array(), 'mdUser'); | |
$user_manufacturers->getRawValue(); // returns an array() | |
// for variables in view template | |
echo $sf_data->getRaw('variable_name'); | |
// disable escaping from class method output |
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
# add to /etc/apt/sources.list | |
deb http://ftp.ca.debian.org/debian stable main contrib | |
deb http://ftp.debian.org/debian/ wheezy-updates main contrib | |
deb http://security.debian.org/ wheezy/updates main contrib |
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
apt-get install libapache2-mod-php5 php5-mysql php5-gd php5-mcrypt php5-curl php-apc | |
a2enmod rewrite | |
a2enmod ssl |
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 each input element, we will assign them a timer to avoid sending too many changes to the server at the same time. | |
var timeout = []; | |
$('.input-element').each(function() { | |
timeout[this.id] = null; | |
}) | |
$('.input-textarea').on('input', function() { | |
clearTimeout(timeout[this.id]); | |
var response = $(this).val(); |
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
smartctl -a /dev/sda | grep Power |
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 | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
$app = require __DIR__.'/bootstrap.php'; | |
$app->match('/contact/', function(Request $request) use ($app) { | |
if ('POST' == $request->getMethod()) { | |
$data = array( |
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
.url-link { | |
word-wrap: break-word; | |
-ms-word-break: break-all; | |
word-break: break-all; | |
word-break: break-word; | |
-webkit-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; | |
} |
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
*, | |
*:after, | |
*:before { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.clearfix:after { | |
content: ""; | |
display: table; |
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
find . -type d -exec chmod 755 {} + |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Single-Column Responsive Email Template</title> | |
<style> | |
@media only screen and (min-device-width: 541px) { | |
.content { |
OlderNewer