Skip to content

Instantly share code, notes, and snippets.

<service id="hart.twig.hart_extension" class="Hart\TodoBundle\Twig\HartExtension">
<tag name="twig.extension" />
</service>
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot "your_directory_path/Symfony/web"
ServerName yourdomain.com
ServerAlias yourdomain.com
<Directory "your_directory_path/Symfony/web">
Options Indexes FollowSymLinks
AllowOverride All
Allow from All
</Directory>
#PHPMYADMIN
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/phpmyadmin"
DirectoryIndex index.php
ServerName phpmyadmin.localhost
<Directory "/Applications/MAMP/htdocs/phpmyadmin">
AllowOverride All
Allow from All
</Directory>
error Tue, 12 Feb 2013 22:38:59 GMT JS Allocation failed - process out of memory
error Tue, 12 Feb 2013 22:38:59 GMT FATAL ERROR:
info: Creating snapshot 0.6.0-9
info: Updating app tweet-a-table
info: Activating snapshot 0.6.0-9 for tweet-a-table
info: Starting app tweet-a-table
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: conservatory Error (500): Internal Server Error
error: at Request.Client._request [as _callback] (/root/nodejitsu/node_modules/conservatory-api/node.js/lib/client/client.js:128:15)
error: at Request.init.self.callback (/root/nodejitsu/node_modules/request/main.js:120:22)
@Fabryz
Fabryz / server.js
Created September 22, 2012 20:50
Phantomjs - render html files contained in dir to png
var page = require('webpage').create(), loadInProgress = false, fs = require('fs');
var htmlFiles = new Array();
console.log(fs.workingDirectory);
var curdir = fs.list(fs.workingDirectory);
// loop through files and folders
for(var i = 0; i< curdir.length; i++)
{
var fullpath = fs.workingDirectory + fs.separator + curdir[i];
// check if item is a file
➜ phantomjs git:(master) qmake-qt4 && make
cd src/ && make -f Makefile.phantomjs
make[1]: Entering directory `/home/fabryz/Documenti/www-node/phantomjs/src'
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DHAVE_CONFIG_H -DHAVE_FCNTL_H -DHAVE_STDARG_H -DHAVE_STDINT_H -DHAVE_UNISTD_H -DUSE_UTF8 -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -Igif -Imongoose -Ilinenoise/src -Ibreakpad/src -I. -o phantom.o phantom.cpp
In file included from phantom.cpp:44:0:
webpage.h:49:1: error: expected class-name before ‘{’ token
phantom.cpp: In member function ‘void Phantom::loadModule(const QString&, const QString&)’:
phantom.cpp:314:66: error: no matching function for call to ‘QWebFrame::evaluateJavaScript(QString&, const QString&)’
phantom.cpp:314:66: note: candidate is:
/usr/include/qt4/QtWebKit/qwebframe.h
@Fabryz
Fabryz / gist:3293643
Created August 8, 2012 09:06
How to install Node.js on Linux
$ sudo apt-get install git-core python libssl-dev build-essential
$ git clone git://github.com/joyent/node.git node && cd node
$ git checkout v0.8.6 (or check the latest stable version on https://github.com/joyent/node/tags)
$ ./configure
$ make (it will take some time)
$ sudo make install
Do a check with:
$ node -v
@Fabryz
Fabryz / gist:3157500
Created July 21, 2012 23:05
HTTP Headers
javascript:(function(){function read(url){var r=new XMLHttpRequest();r.open('HEAD',url,false);r.send(null);return r.getAllResponseHeaders();}alert(read(window.location))})();
@Fabryz
Fabryz / gist:3077360
Created July 9, 2012 16:07
jquery.js
/*!
* jQuery JavaScript Library v1.7.2
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/