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/bash | |
create_event_logger () { | |
echo "Directory /var/log/event_logger is being created..." | |
sudo mkdir /var/log/event_logger | |
sudo chmod -R 777 /var/log/event_logger | |
} | |
create_statsd () { | |
echo "Directory /var/log/statsd is being created..." |
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
# unicode | |
set -g default-terminal "screen-256color" | |
set -g status-bg colour235 | |
set -g status-fg yellow | |
set -sg escape-time 1 | |
setw -g pane-base-index 1 | |
# force a reload of the config file | |
unbind r |
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
// state... | |
const state = { | |
currentQuestion: 1, | |
selectedAnswer: '', | |
score: 0, | |
questions: { | |
1: { | |
title: 'Which element is used for a top-level heading?', | |
correctAnswer: 'h1', |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: foo-service | |
spec: | |
type: ExternalName | |
externalName: foo.staging.bar.com | |
selector: | |
app: foo |
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
# Configuration checksum: 1833417130626304953 | |
# setup custom paths that do not require root access | |
pid /tmp/nginx.pid; | |
load_module /etc/nginx/modules/ngx_http_modsecurity_module.so; | |
daemon off; |
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
yarn add eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-react --dev |
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
> yarn global add gatsby-cli | |
> gatsby new womanlymag-new | |
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
# adapted from: https://gist.github.com/jhartikainen/36a955f3bfe06557e16e | |
#!/bin/bash | |
# Find all js/jsx files staged to commit | |
staged_files=$(git diff --staged --diff-filter=ACMTUXB --name-only | grep '\.jsx\?$') | |
files_to_lint=() | |
# Find all staged js/jsx files created since 2017-01-13 | |
for file in ${staged_files}; do | |
# if the file has previously been committed, get author date of file: |
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
// Only enable eslint if ESLINT env var = true | |
// Will keep things like this until we have 0 errors, then flip switch | |
if (eslintEnabled) { | |
config.module.preLoaders.push({ | |
test: /\.jsx?$/, | |
loader: 'eslint', | |
exclude: /node_modules/, | |
}); | |
} |
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
"scripts": { | |
"precommit": "npm run lint", | |
"lint": ". ./eslint.sh", | |
... | |
}, |
NewerOlder