Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View github.cloudformation.json
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"GithubServiceTopic" : {
"Type" : "AWS::SNS::Topic",
"Properties" : {
"DisplayName" : "Topic for Github pull request integration",
"Subscription" : [
{
View pg-travis-test.sh
#!/bin/bash
set -eux
sudo apt-get update
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common"
# bug: http://www.postgresql.org/message-id/20130508192711.GA9243@msgid.df7cb.de
sudo update-alternatives --remove-all postmaster.1.gz
View backup.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"BackupBucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"LifecycleConfiguration": {
"Rules": [
{
"Id": "Move to Glacier",
@vvondra
vvondra / ManagedSessionTransactionProvider.java
Created Nov 26, 2015
Simplifying transaciton handling
View ManagedSessionTransactionProvider.java
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.context.internal.ManagedSessionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.function.Function;
View dynamicReturnTypeMeta.json
{
"methodCalls": [
{
"class": "\\Mockery",
"method": "mock",
"position": 0,
"mask": "%s|\\Mockery\\MockInterface"
},
{
"class": "\\Nette\\DI\\Container",
View sleeper.php
<?php
require_once __DIR__ . '/../vendor/autoload.php';
class Sleeper extends PHPDaemon\Daemon {
public function run() {
while (true) {
echo "zzzZZZzzz...\n";
sleep(2);
@vvondra
vvondra / find.sh
Created Jan 17, 2013
Zpracovani parametru v bashiu
View find.sh
adresare=""
cesty=true
while [ $# -gt 0 ]
do
# nacteni adresaru, ktere se budou prohledavat
if [ ${1:0:1} != "-" ] ; then
if $cesty ; then
adresare="$adresare $1"
shift
continue
View du.cpp
#include <ostream>
#include <sstream>
#include <iostream>
#include <vector>
class Matice {
public:
void pridej_sloupec(int a) {
}
@vvondra
vvondra / GitBranchPanel.php
Created Sep 5, 2012
Git branch Nette debugger panel
View GitBranchPanel.php
<?php
namespace Vondra;
class GitBranchPanel implements \Nette\Diagnostics\IBarPanel
{
public function getPanel()
{
return '';