Skip to content

Instantly share code, notes, and snippets.

View kaerer's full-sized avatar
🍀
Life goes on.

Erce Erözbek kaerer

🍀
Life goes on.
View GitHub Profile
@kaerer
kaerer / random_strgenerator.php
Created January 31, 2018 14:30 — forked from irazasyed/random_strgenerator.php
PHP: Generate random string
/**
* Generate and return a random characters string
*
* Useful for generating passwords or hashes.
*
* The default string returned is 8 alphanumeric characters string.
*
* The type of string returned can be changed with the "type" parameter.
* Seven types are - by default - available: basic, alpha, alphanum, num, nozero, unique and md5.
*
@kaerer
kaerer / haproxy.cfg
Created July 21, 2017 08:31
Here's a sample WORKING haproxy config for websockets / socketio. We were able to get socketio working on an Amazon ELB with just one node, but when we added multiple nodes, we saw weird client issues. So, we decided to use HAProxy on Ubuntu 12.04 and spent significant time trying to get just the right configuration (haproxy.cfg). Note though th…
global
#debug
#daemon
log 127.0.0.1 local0
defaults
log global
option httplog
frontend unsecured *:80
@kaerer
kaerer / AmazonS3Service.php
Created May 26, 2017 09:59
A simple Symfony Service to Upload Files to Amazon S3
<?php
namespace Acme\DemoBundle\Services;
use Aws\S3\S3Client;
/**
* Class AmazonS3Service
*
* @package Acme\DemoBundle\Service
*/