REST API response format based on some of the best practices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@flow | |
import { createStore, applyMiddleware } from 'redux'; | |
import storage from 'redux-persist/lib/storage' | |
import { composeWithDevTools } from 'redux-devtools-extension'; | |
import { persistStore, persistReducer } from 'redux-persist'; | |
import thunk from 'redux-thunk'; | |
import reducer from 'reducers'; | |
import { createOffline } from '@redux-offline/redux-offline'; | |
import offlineConfig from '@redux-offline/redux-offline/lib/defaults/index'; |
(To be improved)
- httpie (which provides the
http
command) —pip install httpie
- Save the
git-branch-protection.sh
asgit-branch-protection
somewhere in your path (something like~/bin
or~/.local/bin
if you already use it) - Generate a GitHub token and save it as
~/.config/github_token
.
The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd
process, you'll need a copy of the ClamAV databases.
Create a freshclam.conf
file and configure as so
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 8000; | |
server_name localhost; | |
root /Users/dmoore/projects/tutorials/angular-phonecat2/.build; | |
access_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.access.log"; | |
error_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.error.log"; | |
error_page 404 /app/404.html; | |
error_page 403 /app/403.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## backup each mysql db into a different file, rather than one big file | |
## as with --all-databases. This will make restores easier. | |
## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
## Create the user and directories | |
# mkdir -p /var/backups/mysql/databases | |
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
## Remember to make the script executable, and unreadable by others |
NewerOlder