Skip to content

Instantly share code, notes, and snippets.

@aminahaz
aminahaz / 1-react-websockets-reflux.md
Created September 15, 2021 14:48 — forked from danawoodman/1-react-websockets-reflux.md
Using WebSockets with Reflux and React

WebSockets + Reflux + React

Using WebSockets, React and Reflux together can be a beautiful thing, but the intial setup can be a bit of a pain. The below examples attempt to offer one (arguably enjoyable) way to use these tools together.

Overview

This trifect works well if you think of things like so:

  1. Reflux Store: The store fetches, updates and persists data. A store can be a list of items or a single item. Most of the times you reach for this.state in react should instead live within stores. Stores can listen to other stores as well as to events being fired.
  2. Reflux Actions: Actions are triggered by components when the component wants to change the state of the store. A store listens to actions and can listen to more than one set of actions.

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
@aminahaz
aminahaz / iterm2-solarized.md
Created May 19, 2021 11:41 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

# laravel cmd
website documentation: https://laravel.com/
php artisan --version = checks version
laravel new (project name) = makes new project enviroment
php artisan = outputs different kind of commands
php artisan make:auth = made new blade.php file with login form
php artisan serve = run code
php artisan make:controller Authcontroller =
php artisan migrate:rollback = stapje terugdraaien
php artisan migrate = maakt aantal
@aminahaz
aminahaz / git repo commands
Last active May 16, 2025 19:26
git-commands
//inport new repo
make new repository
open cmd to right directory
dir = lists file
git init = initialize the local directory as a git repository
git add . = add all files in directory
git status = all files that have staged for commit
git commit -m "first commit"
git remote add origin "repo url"
git push -u origin master = push the code in local repo to github
@aminahaz
aminahaz / phpunit-assertions.md
Created April 10, 2021 15:29 — forked from briankip/phpunit-assertions.md
A list of PHPUnit assertions
  • assertArrayHasKey
  • assertArrayNotHasKey
  • assertContains
  • assertAttributeContains
  • assertNotContains
  • assertAttributeNotContains
  • assertContainsOnly
  • assertAttributeContainsOnly
  • assertNotContainsOnly
  • assertAttributeNotContainsOnly