start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class CsvController extends Controller | |
{ | |
/** | |
* Get a CSV file from an array |
# Initial configuration | |
git config --global user.name "John Doe" | |
git config --global user.email johndoe@example.com | |
git config --global core.editor "vim" | |
# If you want to skip the staging area when commiting a file | |
git commit -a -m 'added new benchmarks' | |
# Remove a file from git | |
git rm deleteme.txt |
<?php | |
//PHP Fatal error: | |
//SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://endpoint-url?wsdl' : failed to load external entity "..." | |
//Sometimes this happens when SOAP client is communicating with | |
//remote SSL SOAP services that only support //SSLv2, SSLv3, or TLS1.0 | |
//(and not TLS 1.1, TLS 1.2) especially using RC4-SHA ciphers. | |
//The ciphers option in a new stream_context is the necessary bit to make the code work: | |
$opts = array( |
#Create a symlink between your project and /var/www: | |
ln -s /home/andreiboar/Projects/HelloMage/ /var/www/hellomage | |
#Make the site available | |
sudo vim /etc/apache2/sites-available/hellomage.conf | |
#This will create a new hellomage file in the /sites-available/ directory. In this file you should add this: | |
<VirtualHost *:80> | |
DocumentRoot "/var/www/hellomage" | |
ServerName hellomage.dev |
<?php | |
require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
/** | |
* Test case class helpful with Entity tests requiring the database interaction. | |
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
*/ | |
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
{ |
#!/bin/bash | |
function printHelp { | |
echo "Load fixtures and run tests" | |
echo "Usage: runTests.sh [options] [directory]" | |
echo "" | |
echo "Options:" | |
echo " -r|--reset resets the sqlite test database before testing" | |
echo " -h|--help print this help" | |
echo "" |
#Import my_backup.sql file in my_database for user root on localhost. | |
#Useful when my_backup.sql can be too large to import it via phpmyadmin | |
mysql -u root -p -h localhost my_database < my_backup.sql |
<?php | |
#Edit the config.inc.php file. Usually located in /etc/phpmyadmin/config.inc.php | |
#Add this with your data: | |
$i++; | |
$cfg['Servers'][$i]['host'] = ''; | |
$cfg['Servers'][$i]['port'] = ''; | |
$cfg['Servers'][$i]['socket'] = ''; |
# Download from https://golang.org/dl/ | |
$ sudo tar -C /usr/local -xzf go1.3.3.linux-amd64.tar.gz | |
#Add the lines bellow to ~/.bashrc file (and .zshrc if you have it) | |
export GOROOT=/usr/local/go | |
export GOPATH=/home/andrei/go | |
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | |
#Download LiteIde | |
https://github.com/visualfc/liteide |