Skip to content

Instantly share code, notes, and snippets.

@MilesPong
MilesPong / Snowflake.php
Created April 4, 2018 03:29
Snowflake algo sample (PHP)
<?php
use Exception;
/**
* Class Snowflake
*
* @see https://github.com/twitter/snowflake
*/
class Snowflake

Todo list

Recent

  • Category
  • Tag
  • Comment
  • Visitor & view count(use Middleware)
  • Cache
  • Email

Lumen 5.2 Storage facade

To enable the Storage facade in Lumen 5.2 you need to modify a few things.

Filesystem configuration file

First of all you need to create a filesystems.php in a config folder.

The config folder needs to be at the same level as your app and bootstrap folder. If it's not there yet just create it.

@MilesPong
MilesPong / Server-env
Created July 13, 2016 02:41
OOM Error of Centos 6.8
➜ ~ # free -lmh
total used free shared buffers cached
Mem: 1.0G 639M 366M 30M 187M 184M
Low: 868M 501M 366M
High: 138M 137M 252K
-/+ buffers/cache: 267M 739M
Swap: 2.0G 0B 2.0G
serverSpeeder version 3.10.66.29
@MilesPong
MilesPong / peach.log
Created May 15, 2016 12:58
Error occur while running peach
runtime: goroutine stack exceeds 250000000-byte limit
fatal error: stack overflow
runtime stack:
runtime.throw(0x85f7bb0, 0xe)
/usr/local/go/src/runtime/panic.go:530 +0x7f
runtime.newstack()
/usr/local/go/src/runtime/stack.go:940 +0x9a7
runtime.morestack()
/usr/local/go/src/runtime/asm_386.s:382 +0x6f
@MilesPong
MilesPong / to-do-pandora.md
Last active August 12, 2016 07:01
To-do lists for pandora
  • Relational search between models on FeeInfo
  • Package bulk-action into components for repeated calls
  • completed
  • Relational search between models on MatchUserDetail