Skip to content

Instantly share code, notes, and snippets.

View wodka's full-sized avatar

Michael Schramm wodka

  • Tucan.ai GmbH
  • Vienna
View GitHub Profile
@wodka
wodka / ThreadPoolCommand.php
Last active February 18, 2021 20:26
Simple Symfony3 command Thread Pool
<?php
namespace AppBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Process;
Updating dependencies (including require-dev)
- Removing symfony/property-access (v3.0.2)
- Installing symfony/property-access (v3.0.3)
Downloading: 100%
- Removing symfony/options-resolver (v3.0.2)
- Installing symfony/options-resolver (v3.0.3)
Loading from cache
- Removing symfony/intl (v3.0.2)
@wodka
wodka / service.js
Created February 5, 2016 14:14
angular style MS
(function (angular) {
'use strict'; // inside of function -> might break stuff in global context
angular.module('com.acme.module', ['log.ex.uo'])
.factory('AcmeService', AcmeService)
.provider('AcmeConfig', AcmeConfig)
;
AcmeService.$inject = ['$log', '$q', '$http', 'AcmeConfig'];
function AcmeService ($log, $q, $http, AcmeConfig) {
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
# config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", ip: "10.0.0.5"
@wodka
wodka / .htaccess
Created December 8, 2014 22:47
missing htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
Verifying that +wodka is my openname (Bitcoin username). https://onename.io/wodka
<?php
$theme = new Theme();
$theme->setTemplate('pixit');
$c = new ThemeComponent();
$c->setBlock('content');
$c->setComponent('cite');
$c->addOption(new ThemeComponentOption('author', 'Michi'));
merged_branches(){
local red=`tput setaf 1`
local green=`tput setaf 2`
local bold=`tput bold`
local reset=`tput sgr0`
local current_branch=$(git rev-parse --abbrev-ref HEAD)
for branch in $(git branch --merged | cut -c3-)
do
if [[ $branch = $current_branch ]]; then