Skip to content

Instantly share code, notes, and snippets.

How to successfully install vendors of Symfony2 on Dreamhost Shared

Sometimes, simply running php composer install or php composer update will throw an error at building bootstrap.php time. To resolve this issue, proceed like this:

First, run:

php composer update --no-scripts
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<?php
header("Content-type: text/plain");
$json = file_get_contents('php://input');
$data = json_decode($json,true);
$file = __DIR__ . '/../app/logs/git.log';
$date = date('Y-m-d H:i:s');
if(!count($data['commits'])) {

Improve memory usage on AMAZON EC2 Micro instance

Try to Change this setting in mysql configuration file (my.cnf)

key_buffer              = 8M 
max_connections         = 30 // Limit connections
query_cache_size        = 8M // try 4m if not enough 
query_cache_limit = 512K

Full Debian backup procedure

The backup

Create the shell script

Before anything, create the backup dir:

SELECT
p.*,
GROUP_CONCAT(t.tag_name) tagged
FROM
tags_relation tr
INNER JOIN posts p ON p.post_id = tr.rel_post_id
INNER JOIN tags t ON t.tag_id = tr.rel_tag_id
GROUP BY
p.post_id
/*All you have to do is create a div inside the div you want to give an inset border to*/
#something {
background: transparent url(http://davidrhysthomas.co.uk/linked/astrid_avatar.png) 50% 50% no-repeat;
min-width: 300px;
min-height: 300px;
padding: 0;
position: relative;
}
#!/bin/bash
filedir=$1;
echo "Starting converstion to mp4 script"
if [ -d "$filedir" ]; then
cd "$filedir"
for file in ./* ;
do
if [[ $file = *.mkv || $file = *.avi ]] ; then
#!/bin/bash
item=$1
# A directory or a file must be provided
if [ -z $item ]; then
echo "You must specify a file or a folder"
exit 0
elif [ ! -d $item ] && [ ! -f $item ]; then
echo "The entry you specified is not a folder or a file"
WP Bag of Tricks
1. Helpful Scripts/Plugins:
Hacks:
http://wordpress.org/extend/plugins/tac/
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.)
http://wordpress.org/extend/plugins/wp-malwatch/