Skip to content

Instantly share code, notes, and snippets.

View recca0120's full-sized avatar
💭
Looking for a job

Recca Tsai recca0120

💭
Looking for a job
View GitHub Profile
@recca0120
recca0120 / .php_cs.dist
Created February 7, 2019 12:52
php-cs-fixer for laravel
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => [
'syntax' => 'short',
],
'binary_operator_spaces' => [
@recca0120
recca0120 / .vimrc
Created February 4, 2019 23:06 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@recca0120
recca0120 / notes.md
Created August 28, 2018 17:18 — forked from inecmc/notes.md
How to run multiple Redis instances on Ubuntu 16.04

Create the directory for the new instance

$ sudo install -o redis -g redis -d /var/lib/redis2

Create a new configuration file

$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
@recca0120
recca0120 / BadEgg.php
Last active August 10, 2018 09:01
聖佑愛吃蛋
<?php
class BadEgg implements Egg
{
public function eaten()
{
return 'Unsatisfy';
}
}
@recca0120
recca0120 / .zshrc
Created July 5, 2018 06:47 — forked from vocolboy/install.md
pretty zsh ( iTerm2 , Zsh , Oh My Zsh , Powerlevel9K )
DEFAULT_USER=$USER
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
PATH=$PATH:/usr/local/sbin
# Path to your oh-my-zsh installation.
export ZSH=/Users/$USER/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
@recca0120
recca0120 / Cloudflare.php
Last active January 9, 2022 06:08
Cloudflare.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Routing\UrlGenerator;
use Illuminate\Http\RedirectResponse;
class Cloudflare
@recca0120
recca0120 / ForceJson.php
Last active June 5, 2018 06:09
Laravel ForceJson
<?php
namespace App\Http\Middleware;
use Closure;
class ForceJson
{
/**
* Handle an incoming request.
@recca0120
recca0120 / Facebook.js
Created June 22, 2017 05:10
Facebook Promise Wrapper
'use strict';
export class Facebook {
getScript() {
return new Promise((resolve) => {
if (window.FB) {
resolve(window.FB);
}
const id = 'facebook-jssdk';
@recca0120
recca0120 / Flunt.php
Last active June 14, 2017 04:07
Flunt API
<?php
class Fluent
{
protected $messages = [];
public function hello()
{
$this->messages[] = 'hello';
<?php
namespace App\Http\Middleware;
use Closure;
use Exception;
use Ramsey\Uuid\Uuid;
class RequestId
{