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
redmine@Sparta:/opt/redmine/2.0.3-icmaa$ rake redmine:plugins:migrate RAILS_ENV=production --trace | |
** Invoke redmine:plugins:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
cannot load such file -- dispatcher | |
/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require' | |
/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require' | |
/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency' | |
/var/lib/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require' |
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
require_once __DIR__.'/../vendor/autoload.php'; | |
$app = new Silex\Application(); | |
$app->get('/', function () { | |
$uname = shell_exec('uname -a'); | |
return "<img src='logo.jpg' style='width:26px; height:26px; float: left;' /><h3>Hello says <em>Silex</em> running on <em>Raspberry Pi</em>!</h3></br>> php shell_exec('uname -a')<br/> <code>{$uname}</code>"; | |
<em>Silex<$ | |
}); |
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
import subprocess | |
import os | |
import time | |
import pprint | |
import sys | |
steps = [ | |
[ | |
['sh', './thread-sleep-5.sh'], | |
['sh', './thread-sleep-3.sh'], |
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
#!/bin/bash | |
declare -a status=() | |
declare -a threads=( | |
[0]='sh ./thread-sleep-5.sh' | |
[1]='sh ./thread-sleep-10.sh' | |
[2]='sh ./thread-sleep-3.sh' | |
) | |
date |
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 | |
namespace App\Provider; | |
use Silex\Application; | |
use Silex\ServiceProviderInterface; | |
use Symfony\Component\Routing\Exception\ResourceNotFoundException; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; |
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
namespace MyCompany\MyBundle\Entity; | |
use Hahaitsfate\ApiBundle\Mapping\Annotations as Api; | |
/** | |
* @API\Collection(name="products") | |
* @ORM\Table(name="products") | |
* @ORM\Entity | |
*/ | |
class Product |
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
function array_path($array, $path) { | |
$matches = preg_split("/\[|\]/", $path, -1, PREG_SPLIT_NO_EMPTY); | |
if(empty($matches)) { | |
return null; | |
} | |
$data = $array; | |
foreach($matches as $key) { | |
if(!array_key_exists($data, $matches)) { | |
return null; | |
} |
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
sven@sven-work:~/Arbeitsplatz/Projekte/pint$ ab -n 10000 -c 8 localhost:3000/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 1000 requests | |
Completed 2000 requests | |
Completed 3000 requests | |
Completed 4000 requests |
NewerOlder