- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone git@gist.github.com:<hash>.git # or with ssh
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
<?php | |
/** | |
* Automatically alias Laravel Model's to their base classname. | |
* Ex: "App\Models\User" now can just be accessed by "User" | |
*/ | |
if (! function_exists('aliasModels')) { | |
function aliasModels() { | |
$finder = new \Symfony\Component\Finder\Finder(); | |
$finder->files()->name('*.php')->in(base_path().'/app'); |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
<html> | |
<head> | |
<style> | |
.row div { | |
height: 8px; | |
display: inline-block; | |
width: 8px; | |
} | |
.row div.active { | |
background-color: red; |
-- Create Enum | |
CREATE TYPE enum_type AS ENUM ('Value 1', 'Value 2'); | |
-- List All Enum | |
SELECT UNNEST(ENUM_RANGE(null::enum_type)); | |
-- Add Value | |
ALTER TYPE enum_type ADD VALUE 'New Value'; | |
-- Delete Value |
###Redux Egghead Video Notes###
####Introduction:#### Managing state in an application is critical, and is often done haphazardly. Redux provides a state container for JavaScript applications that will help your applications behave consistently.
Redux is an evolution of the ideas presented by Facebook's Flux, avoiding the complexity found in Flux by looking to how applications are built with the Elm language.
####1st principle of Redux:#### Everything that changes in your application including the data and ui options is contained in a single object called the state tree
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |
TL;DR of https://pages.apigee.com/rs/351-WXY-166/images/ebook-2013-03-wad.pdf
[EDIT 04/01/2021] https://docs.apigee.com/files/Web-design-the-missing-link-ebook-2016-11.pdf
- Nouns are good; verbs are bad
- keep simple things simple
- keep your base URL simple and intuitive
- 2 base URLs per resource
/dogs
for collections;/dogs/1234
for item
Reposted from Qiita
For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.
There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.
If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow: