Skip to content

Instantly share code, notes, and snippets.

View docteurklein's full-sized avatar

Florian Klein docteurklein

View GitHub Profile
### Keybase proof
I hereby claim:
* I am docteurklein on github.
* I am docteurklein (https://keybase.io/docteurklein) on keybase.
* I have a public key whose fingerprint is 3D72 A8B7 E58D 01F7 72CD 17D7 962C 67BE E5C3 F3FC
To claim this, I am signing this object:
HTTP/1.1 404 Not Found
Content-Length: 5
Nope
@docteurklein
docteurklein / Bundle.php
Created October 2, 2014 11:33
bundle is its own compiler pass
<?php
class App extends Bundle implements CompilerPassInterface
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass($this);
}
public function process(ContainerBuilder $container)
{
SELECT
a.*,
COUNT(c.comment_id) OVER (PARTITION BY c.article_id, _r.associated_article_id) nb_comments,
COUNT(_r.weight) OVER (PARTITION BY _r.associated_article_id, _r.article_id) nb_associated_articles,
c.*,
r.*,
_r.weight
FROM article a
LEFT JOIN comment c USING (article_id)
LEFT JOIN relates_to _r ON a.article_id = _r.article_id
api:
build: fig/php
ports:
- '8000:8000'
working_dir: /src
volumes:
- backend:/src
entrypoint: [php, '-dextension=gearman.so', '-ddate.timezone=UTC']
command: '-S 0.0.0.0:8000 -t web'
links:
@docteurklein
docteurklein / controller.php
Created July 29, 2015 08:59
how to make the selected offer checked?
$data = [
'offer' => new OfferForCustomer($ticket->getCustomer(), $ticket->getOffer(), 0, 0, 0),
];
$form = $this->createForm('season_ticket', $data, [
cvlc screen:// :screen-fps=8.0 :input-slave=alsa://hw:2,0 ":sout=#transcode{vcodec=theo,vb=800,scale=1,width=1024,height=768,acodec=vorbis}:http{mux=ogg,dst=0.0.0.0:8081/desktop.ogg}"
[email protected]:docteurklein/continuous-delivery.git
defmodule Edgar.Responder.NotNot do
@moduledoc """
resays what has been said
"""
use Hedwig.Responder
@usage """
<text> (!!) - resays what has been said
@docteurklein
docteurklein / README.md
Last active April 16, 2023 23:23
install a linux hl2:ep2 sourcemod

install an hl2:ep2 sourcemod on linux

  1. go to ~/.steam/steam/steamapps/sourcemods
  2. put install.sh and gameinfo.txt in this folder (and config.cfg if you have one)
  3. downldoad a mod archive (example: hl2-ep2-sp-6x10mc-doorville.7z at http://www.runthinkshootlive.com/posts/doorville/)
  4. run ./install.sh hl2-ep2-sp-6x10mc-doorville.7z doorville
  5. restart steam
  6. enjoy