Skip to content

Instantly share code, notes, and snippets.

package me.paulschwarz.processor;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.function.Consumer;
@paulschwarz
paulschwarz / remove untagged docker images
Created April 6, 2017 10:15
remove unused docker images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
@paulschwarz
paulschwarz / remove exited docker containers
Last active August 31, 2016 09:37
Remove all exited Docker containers
docker rm -v $(docker ps -a -q -f status=exited)
<html>
<head>
</head>
<body>
I'm the chrome.
<div id="a big div that wraps admin, where's the problem?">
I'm the admin menu
<html>
<head>
</head>
<body>
I'm the chrome.
{{>content}}
</body>
</html>
<?php
class Kostache_Page extends Kostache_Base {
/**
* @return Kostache_Page
*/
public static function factory()
{
$m = new Mustache_Engine(
protected function _response_view()
{
/**
* We can determine the view for each request based on the route
* directory/controller/action
*/
$directory = $this->request->directory();
$controller = $this->request->controller();
$action = $this->request->action();
// The action has not gone through PSR-0 yet
@paulschwarz
paulschwarz / spec
Last active December 19, 2015 05:08
<?php
namespace spec\SO\Entity;
use
PHPSpec2\ObjectBehavior,
SO\Entity\Money as M;
class Money extends ObjectBehavior {
<?php
class FooValidator implements Validator
{
public function __construct(Validator $validator)
{
$this->validator = $validator
$this->validator->rule('name', 'not_empty')
->rule('name', 'max_length', [':value', 35])
->rule('name', 'min_length', [':value', 5]);
@paulschwarz
paulschwarz / foo.rb
Created September 28, 2012 20:27 — forked from fujin/foo.rb
template override between cookbooks
template "/tmp/foo.rb"
source "foo.rb.erb"
cookbook "banana"
end