Skip to content

Instantly share code, notes, and snippets.

View binalfew's full-sized avatar

Binalfew Kassa binalfew

  • Vintage Solutions
  • Addis Ababa, Ethiopia
  • X @binalfew
View GitHub Profile
<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class AuthController extends Controller
@binalfew
binalfew / material.vim
Created January 25, 2016 14:27
Vim color scheme, base on Material Theme
" Add this to .vimrc :
" ====================
" set nocompatible
" set t_Co=256
" set background=dark
" colorscheme material
" ====================
"
" Material Theme (https://github.com/equinusocio/material-theme)
" Scheme: Mattia Astorino
@binalfew
binalfew / t.sh
Created April 8, 2016 14:59 — forked from wesbos/t.sh
# Put this in your .zshrc or .bashrc file
# Install `tree` first — brew install tree
function t() {
# Defaults to 3 levels deep, do more with `t 5` or `t 1`
# pass additional args after
tree -I '.git|node_modules|bower_components|.DS_Store' --dirsfirst --filelimit 15 -L ${1:-3} -aC $2
}
@binalfew
binalfew / WindowsTerminal.md
Created January 17, 2021 17:51 — forked from dahlsailrunner/WindowsTerminal.md
Customization and Setup notes for Windows Terminal
@binalfew
binalfew / machine.js
Created November 11, 2022 05:34
Generated by XState Viz: https://xstate.js.org/viz
const doorMachine = Machine({
id: 'doorMachine',
initial: 'locked',
states: {
locked: {
id: 'locked',
on: {
UNLOCK: 'unlocked'
}
},
@binalfew
binalfew / machine.js
Last active December 5, 2022 20:41
Generated by XState Viz: https://xstate.js.org/viz
const lightBulbMachine = Machine( {
id: 'lightBulb',
initial: 'unlit',
states: {
lit: {
exit: () => {
console.log('it is so dark and cold');
},
on: {
BREAK: {
@binalfew
binalfew / machine.js
Created December 5, 2022 20:46
Generated by XState Viz: https://xstate.js.org/viz
const echoMachine = Machine({
id: 'echo',
initial: 'listening',
states: {
listening: {
on: {
SPEAK: {
actions: send({type: 'ECHO'})
},
@binalfew
binalfew / machine.js
Last active December 5, 2022 21:09
Generated by XState Viz: https://xstate.js.org/viz
const alarmClock = Machine({
id: 'alarmClock',
initial: 'idle',
states: {
idle: {
on: {
ALARM: 'alarming'
}
},
alarming: {
@binalfew
binalfew / machine.js
Last active December 5, 2022 21:25
Generated by XState Viz: https://xstate.js.org/viz
const vendingMachine = Machine(
{
id: 'vendingMachine',
initial: 'idle',
context: {
deposited: 0,
},
states: {
idle: {
on: {
@binalfew
binalfew / machine.js
Last active December 5, 2022 21:42
Generated by XState Viz: https://xstate.js.org/viz
const door = Machine({
id: 'door',
initial: 'locked',
states: {
locked: {
id: 'locked',
on: {
UNLOCK: 'unlocked',
},
},