Skip to content

Instantly share code, notes, and snippets.

Sandro Keil sandrokeil

Block or report user

Report or block sandrokeil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hollodotme / generatorForEach.php
Created Nov 7, 2018
Comparison of generator with foreach and yield from
View generatorForEach.php
<?php declare(strict_types=1);
class Test
private $arr = [];
public function __construct()
for ( $i = 0; $i < 10000; $i++ )
oukayuka / FlashMessage.tsx
Last active Nov 28, 2019
Recompose withStateHandlers with TypeScript
View FlashMessage.tsx
import * as React from 'react';
import { compose, lifecycle, pure, StateHandler, StateHandlerMap, withStateHandlers } from 'recompose';
import { Message, Transition } from 'semantic-ui-react';
import './FlashMessage.css';
export interface FlashMessageProps {
message: string;
isWarning?: boolean;
shortjared / list.txt
Last active Jan 17, 2020
List of AWS Service Principals
View list.txt
View EventMachine_Example.postman_collection.json
"variables": [],
"info": {
"name": "EventMachine Example",
"_postman_id": "89698ba0-98f0-cc94-2f71-9f19c183e3f3",
"description": "",
"schema": ""
"item": [
caraboides /
Last active Dec 14, 2019
Simple script to backup MongoDB to S3, without waste diskspace for temp files. And a way to restore from the latest snapshot.
set -e
S3BACKUP=$S3PATH`date +"%Y%m%d_%H%M%S"`.dump.gz
/usr/bin/aws s3 mb $S3PATH
Last active Jan 5, 2020
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

Boot from USB and set prepare system

loadkeys <your-keymap>
codeliner / Message.php
Last active Dec 10, 2016
Single prooph message class
View Message.php
declare(strict_types = 1);
namespace Acme\Model;
use Prooph\Common\Messaging\DomainMessage;
use Prooph\Common\Messaging\Message as ProophMessage;
class Message extends DomainMessage
codeliner / MongoConnection.php
Last active Apr 6, 2017
prooph MongoEventStore v7
View MongoConnection.php
declare(strict_types = 1);
namespace Acme\Infrastructure\MongoDb;
use MongoDB\Client;
use MongoDB\Collection;
class MongoConnection
mjnaderi /
Last active Dec 16, 2019 — forked from mattiaslundberg/arch-linux-install
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
saurshaz / aws-uploader.html
Last active Oct 3, 2016
aws-uploader riot component with server side code
View aws-uploader.html
const riot = require('riot')
<div class='container'>
<form method="POST" action="/save-details">
<input type="file" id="file-input" onchange={initUpload}>
<p id="status">Please select a file</p>
<section if={opts.imagefile === 'true'}>
<img style="border:1px solid gray;width:300px;" id="preview" src="/images/default.png">
<input type="hidden" id="avatar-url" name="avatar-url" value="/images/default.png">
You can’t perform that action at this time.