start new:
tmux
start new with session name:
tmux new -s myname
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"os/exec" | |
"os/signal" | |
"time" | |
) |
//**dataURL to blob** | |
function dataURLtoBlob(dataurl) { | |
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], | |
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); | |
while(n--){ | |
u8arr[n] = bstr.charCodeAt(n); | |
} | |
return new Blob([u8arr], {type:mime}); | |
} |
#!/bin/bash | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password password vagrant' | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password vagrant' | |
apt-get update | |
apt-get install -y mysql-server |
<?php | |
/** | |
* This class can add WSSecurity authentication support to SOAP clients | |
* implemented with the PHP 5 SOAP extension. | |
* | |
* It extends the PHP 5 SOAP client support to add the necessary XML tags to | |
* the SOAP client requests in order to authenticate on behalf of a given | |
* user with a given password. | |
* |
#!/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 "" |
<?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 | |
{ |