Skip to content

Instantly share code, notes, and snippets.

Daniel McKay dan-mckay

Block or report user

Report or block dan-mckay

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hasura-get-started.md

Hasura - get started

Create a table

Go to http://localhost:8080/console and navigate to Data -> Create table

For example, let us go with a user table with the following rows:

user (
  id INT PRIMARY KEY,
@dan-mckay
dan-mckay / docker-hasura.md
Last active Oct 2, 2019
docker hasura setup
View docker-hasura.md
View docker-bits.md

Docker Stuff

It provides all the files and code your container will need. Running the docker build command creates a Docker image using the Dockerfile. This built image is in your machine's local Docker image registry

Create Docker image with name with path to docker file

docker build -t <username>/<name-of-image> ./path/to/Dockerfile

Running a container launches your software with private resources, securely isolated from the rest of your machine.

View elastic-search-commands.md

populate the database with dummy data from json file in cwd called test-data.json

curl -H "Content-Type: application/json" -XPOST "http://localhost:9200/product/default/_bulk?pretty" --data-binary "@test-data.json"
@dan-mckay
dan-mckay / accessibility-basics.md
Created Dec 6, 2018
Accessibility Basic Notes
View accessibility-basics.md

Accessibility

Free Code Camp Notes

Three things to look out for:

  • Code should be well organised and use the appropriate html elements
  • Ensure test alternatives exist for visual content
  • Provide keyboard navigation
@dan-mckay
dan-mckay / reason-snippets.md
Created Jan 11, 2018
Reason commands, snippets etc
View reason-snippets.md

ReasonML Commands, Snippets, etc

Create a Reason App

bsb -init app-name-here -theme basic-reason

Create a ReasonReact App

bsb -init my-react-app -theme react
View mysql-docker.md

Set Up

Run mysql as root on port 3306 (password: 123)

docker run --name db -d -e MYSQL_ROOT_PASSWORD=123 -p 3306:3306 mysql:latest

Get running docker processes

docker ps
@dan-mckay
dan-mckay / fixed-layout-epub.md
Last active Feb 15, 2017
Notes on what we should parse from fixed layout epub
View fixed-layout-epub.md

Fixed Layout Epubs

The rendition:layout property

  • pre-paginated
  • reflowable default

Book - <meta property="rendition:layout">pre-paginated</meta>

Spine - <itemref id="titlepage" properties="rendition:layout-pre-paginated"/>

View rollup-config-with-eslint.js
// Rollup plugins
import babel from 'rollup-plugin-babel';
import eslint from 'rollup-plugin-eslint';
export default {
entry: 'src/scripts/main.js',
dest: 'build/js/main.min.js',
format: 'iife',
sourceMap: 'inline',
plugins: [
View Installation
1. Install Mongodb - I used Homebrew
2. sudo mkdir -p /data/db
3. sudo chown <username> /data/db
4. mongod - (runs mongo)
You can’t perform that action at this time.