Skip to content

Instantly share code, notes, and snippets.

View luandevpro's full-sized avatar

Luận Trần luandevpro

View GitHub Profile
@GavinRay97
GavinRay97 / README.md
Last active September 30, 2020 15:20
Hasura MySQL Test Setup
View README.md

Put the docker-compose.yaml into a new folder, along with a folder called /migrations. Put the sample SQL in there at /migrations/any-name.sql. This will seed the MySQL DB on startup.

Run docker-compose up -d, and visit Hasura at http://localhost:8080

Note: If you would like to a connect to an existing MySQL DB running outside of Docker on localhost, you will need to edit the configuration for the Hasura service so that it uses host networking. Then use localhost for the --mysql-host argument. Also, in order for Hasura on localhost to connect to the Docker Postgres instance, you'll need to add 5432:5432 to the service port configurations for postgres so that it's exposed, then change the DB URL to postgres://postgres:postgrespassword@localhost:5432/postgres.

services:
  graphql-engine:
 # ...
View index.js
"eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "typescript", "autoFix": true },
{
"language": "typescriptreact",
"autoFix": true
}
],
@luandevpro
luandevpro / index.html
Last active November 29, 2019 09:30 — forked from jcollins-g/index.html
Sunflower
View index.html
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
@codediodeio
codediodeio / config.js
Last active November 22, 2023 10:39
Snippets from the Firestore Data Modeling Course
View config.js
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@a-barbieri
a-barbieri / README.md
Last active June 6, 2021 21:48
NextJS sitemap generator with dynamic URL
View README.md

NextJS sitemap generator

Install

The current setup has been tested on Next Js 7.0.0.

You need to install Axios.

$ npm install axios
View github.font
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
View iptv.m3u8
#EXTM3U
#EXTINF:-1 tvg-id="Ecmin" tvg-logo="https://gg.gg/ecmin", ♥♥♥ List By deathemperor
https://gg.gg/ecmin
#EXTINF:-1 tvg-id="Ecmin" tvg-logo="https://gg.gg/thvl-1" group-title="THVL", Vĩnh Long 1
http://live.cdn.mobifonetv.vn/motv/mythvl1_hls.smil/chunklist.m3u8
#EXTINF:-1 tvg-id="Ecmin" tvg-logo="https://gg.gg/thvl-2" group-title="THVL", Vĩnh Long 2
http://live.cdn.mobifonetv.vn/motv/mythvl2_hls.smil/chunklist.m3u8
#EXTINF:-1 tvg-id="Ecmin" tvg-logo="https://gg.gg/vtv-1" group-title="VTV", VTV1 HD S1
https://cdn-livestream-live.vtvgiaitri.vn/vtv1.smil/chunklist_b2000000.m3u8
#EXTINF:-1 tvg-id="Ecmin" tvg-logo="https://gg.gg/vtv-1" group-title="VTV", VTV1 HD S2
@ericwindmill
ericwindmill / form_page.dart
Created April 14, 2018 19:25
Flutter Simple inherited Widget Example
View form_page.dart
import 'package:flutter/material.dart';
import 'package:simple_inherit/state_container.dart';
class UpdateUserScreen extends StatelessWidget {
static final GlobalKey<FormState> formKey = new GlobalKey<FormState>();
static final GlobalKey<FormFieldState<String>> firstNameKey =
new GlobalKey<FormFieldState<String>>();
static final GlobalKey<FormFieldState<String>> lastNameKey =
new GlobalKey<FormFieldState<String>>();
static final GlobalKey<FormFieldState<String>> emailKey =
@mwickett
mwickett / formikApollo.js
Last active December 20, 2022 23:00
Formik + Apollo
View formikApollo.js
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'
@rmtsrc
rmtsrc / postgres-json-cheatsheet.md
Last active October 22, 2023 12:16
Using JSON in Postgres by example
View postgres-json-cheatsheet.md

PostgreSQL JSON Cheatsheet

Using JSON in Postgres by example.

Quick setup via Docker

  1. Download and install: Docker Toolbox
  2. Open Docker Quickstart Terminal
  3. Start a new postgres container:
    docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres