Skip to content

Instantly share code, notes, and snippets.

View ziterz's full-sized avatar

Ziady Mubaraq ziterz

View GitHub Profile
@ziterz
ziterz / main.js
Last active August 19, 2021 05:50
Redux with Plain Javascript
const createStore = (reducer) => {
let state
let listeners = []
const getState = () => state
const dispatch = (action) => {
state = reducer(state, action)
listeners.forEach(listener => listener())
}
@ziterz
ziterz / API.md
Created October 25, 2020 14:55
REST API documentation from @iros

Movie App

Movie App is an database for movies and TV shows.

RESTful Endpoints

  • GET /movies/:id

Show Movie

Returns json data about a single movie.

@stefanschmidt
stefanschmidt / fix-homebrew-owner-perms.sh
Created April 12, 2016 21:19
Fix ownership and permissions of a multi-user Homebrew installation
# fix owner of files and folders recursively
sudo chown -vR $(whoami) /usr/local /opt/homebrew-cask /Library/Caches/Homebrew
# fix read/write permission of files and folders recursively
chmod -vR ug+rw /usr/local /opt/homebrew-cask /Library/Caches/Homebrew
# fix execute permission of folders recursively
find /usr/local /opt/homebrew-cask /Library/Caches/Homebrew -type d -exec chmod -v ug+x {} +
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: