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
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
oukayuka / FlashMessage.tsx
Last active Jun 19, 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
shortjared / list.txt
Last active Nov 21, 2019
List of AWS Service Principals
View list.txt
acm.amazonaws.com
alexa-appkit.amazon.com
apigateway.amazonaws.com
application-autoscaling.amazonaws.com
appstream.application-autoscaling.amazonaws.com
appsync.amazonaws.com
athena.amazonaws.com
autoscaling.amazonaws.com
batch.amazonaws.com
channels.lex.amazonaws.com
View EventMachine_Example.postman_collection.json
{
"variables": [],
"info": {
"name": "EventMachine Example",
"_postman_id": "89698ba0-98f0-cc94-2f71-9f19c183e3f3",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@caraboides
caraboides / backup-mongodb-to-s3.sh
Last active Sep 23, 2019
Simple script to backup MongoDB to S3, without waste diskspace for temp files. And a way to restore from the latest snapshot.
View backup-mongodb-to-s3.sh
#!/bin/sh
set -e
HOST=localhost
DB=test-entd-products
COL=asimproducts
S3PATH="s3://mongodb-backups-test1-entd/$DB/$COL/"
S3BACKUP=$S3PATH`date +"%Y%m%d_%H%M%S"`.dump.gz
S3LATEST=$S3PATH"latest".dump.gz
/usr/bin/aws s3 mb $S3PATH
@heppu
heppu / ARCH_INSTALL.MD
Last active Nov 17, 2019
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot
View ARCH_INSTALL.MD

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
codeliner / Message.php
Last active Dec 10, 2016
Single prooph message class
View Message.php
<?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
codeliner / MongoConnection.php
Last active Apr 6, 2017
prooph MongoEventStore v7
View MongoConnection.php
<?php
declare(strict_types = 1);
namespace Acme\Infrastructure\MongoDb;
use MongoDB\Client;
use MongoDB\Collection;
class MongoConnection
@mjnaderi
mjnaderi / install-arch.md
Last active Nov 18, 2019 — forked from mattiaslundberg/arch-linux-install
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
View install-arch.md
@saurshaz
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')
<aws-uploader>
<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.