Skip to content

Instantly share code, notes, and snippets.

View sgobotta's full-sized avatar
:octocat:

Santiago Botta sgobotta

:octocat:
View GitHub Profile
@sgobotta
sgobotta / nodejs.yml
Created April 17, 2020 23:41
Example Github Action script for static node websites deployment on Dokku
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ my-target-branch ]
jobs:
@sgobotta
sgobotta / paginatedGrid.js
Last active March 20, 2020 16:43
A react gist for paginated grids, using react hooks.
export default function GridScreen() {
const [isFetchingComplete, setFetchingComplete] = React.useState(false);
const [tweetsState, setTweetsState] = React.useState({
// initialises an empty array for tweets results
results: [],
})
// The API url should go here. E.g: http://localhost:8000
const hostUrl = '...'
// descendant order, depends on the node backend implementation - @sgobotta
const sortParam = `sort=-created_at`
{
"root": true,
"env": {
"node": true,
"es6": true
},
"parser": "vue-eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"