Skip to content

Instantly share code, notes, and snippets.

@glippi
glippi / gist:a08931475358058e48332574e11ee09a
Created March 22, 2020 12:01
Installation of latest NeoVim release for Ubuntu/Debian based Linux distros
Remove the current version of NeoVim sudo apt-remove neovim
Download latest version appimage from github (https://github.com/neovim/neovim/releases)
cd into the directory it was downloaded to e.g. cd ~/Downloads
Make it executable for your user chmod u+x ./nvim.appimage
Move it to a folder that's indexed in your PATH env var so your computer knows what you mean when you type nvim. You can check the folders in your current path by typing echo $PATH which will show you something like this: /usr/local/bin:/usr/bin. Notice there are 2 folders here in this case separated by a colon (:). You will likely have more than two. /usr/local/bin is a common place to stick it. To move it there you'll need to use sudo: sudo mv nvim.appimage /usr/local/bin/nvim
@glippi
glippi / gist:cdce81b0c5638bd352253d1ff770fed5
Created October 22, 2019 14:02
Example of technical documentation
# 🧙 merlin-serverless
> Skills and Craftspeople management tool
## :construction: Work in progress:
This repository contains a the work that we started on the branch `graphql-hasura` of [merlin's repository](https://github.com/codurance/merlin).
The scope is to build an application that should help Codurance's members to
have a quick overview of all the people that work in the company and their
skills, together with some other informations about location and whether they're in the bench or not.
@glippi
glippi / gist:9ee88bf59ba22c59bdf78db3fd5afc9c
Created October 22, 2019 13:56
Example of lazy loading entry point of React App following Kent Dodds example
import React, { Suspense, lazy, useEffect } from 'react';
import { LoadingSpinner } from './LoadingSpinner';
import { useUser } from '../context/UserContext';
const loadAuthenticatedApp = () => import('./AuthenticatedApp');
const AuthenticatedApp = lazy(loadAuthenticatedApp);
const UnauthenticatedApp = lazy(() => import('./UnauthenticatedApp'));
function App() {
const { user, logout } = useUser();
@glippi
glippi / barcelona-geojson.json
Created September 16, 2019 15:31
Barcelona ABS geojson
{"type":"Feature","properties":{"CODIABS":"383","NOMABS":"Barcelona - 03H","CODISS":"7849","NOMSS":"Barcelona Sants - Montjuïc","CODIRS":"78","NOMRS":"Regió Sanitària Barcelona","CODIAGA":"46","NOMAGA":"Barcelona Esquerra","ÀREA":671507.09,"VALORES":[13.6,16.7,25.9]},"geometry":{"type":"Polygon","coordinates":[[[361.52647040971004,655.3579540138055],[361.5361578148694,654.563267701877],[361.69115629741873,651.4129041081603],[362.03990288315464,647.7800523964871],[365.0623732928663,644.0431346201566],[368.45296509863266,640.5521911784707],[372.0469924127449,634.771794314324],[371.4269984825476,633.8541208350732],[369.57670409711517,631.8390234012544],[367.6682852807267,629.2089901308243],[365.6629924127449,626.7965495410414],[364.8298755690424,625.6802044838084],[368.3076540212426,622.2365637987848],[369.98357511380715,620.6755728289253],[369.5960789074338,620.2309269162986],[369.50889226099986,619.4267800530376],[369.5573292867965,618.4996460224544],[369.9642003034885,617.7049597105258],[370.5841942336857,617
@glippi
glippi / FINAL
Last active September 3, 2019 14:48
{"type":"Topology","arcs":[[[37216,69167],[1,-84],[16,-333],[36,-384],[312,-395],[350,-369],[371,-611],[-64,-97],[-191,-213],[-197,-278],[-207,-255],[-86,-118]],[[37557,66030],[359,-364],[173,-165],[-40,-47],[-9,-85],[5,-98],[42,-84],[64,-55],[57,-36],[37,-18],[89,-2],[61,9],[68,42],[0,3],[287,-275],[574,-570],[833,-848],[476,-471],[203,-214]],[[40836,62752],[499,305],[366,256],[-166,220],[-166,215],[-30,52],[-34,78],[-19,87],[-22,163],[-20,105],[-18,97],[-29,74],[1036,1437],[127,148],[518,298],[310,109],[28,11]],[[43216,66407],[440,201],[160,102],[83,82],[154,636],[-483,-565],[-69,56],[-5,70],[-48,114],[-117,95],[-21,41],[-40,20],[-143,440],[-6,49],[-12,65],[-7,80],[124,292],[-319,272],[-172,197],[-8,99],[-211,206],[-9,-106],[-23,-70],[-92,-111],[-156,-150],[-179,-139],[-157,-112],[-118,-107],[-77,-55],[-87,-53],[-110,-57],[-107,-59],[-75,-44],[-64,-46],[-68,-59],[-105,-130],[-185,-285],[-572,333],[-173,90],[-356,183],[-741,399],[-687,370],[279,557],[415,799],[-170,90],[-266,151],[-369,-784],[-270,144],[-195
@glippi
glippi / all abs
Created September 3, 2019 14:32
abs
This file has been truncated, but you can view the full file.
@glippi
glippi / ABS_2018.json
Created September 2, 2019 13:03
Topojson containing Barcelona ABS areas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@glippi
glippi / gist:ada9db8197817a3c72ee0436fe17b940
Created February 11, 2019 11:57
Create gif from .mov
ffmpeg -ss 00:00:00.000 -i screencast.mov -pix_fmt rgb24 -r 10 -s 1000x400 -t 00:00:00.000 output.gif | gifsicle --optimize=3 --delay=3 > out.gif
@glippi
glippi / tachyons.txt
Created February 7, 2019 23:05
Tachyons dictionary
pa0
pa1
pa2
pa3
pa4
pa5
pa6
pa7
pl0
pl1
const colorScale = scaleLinear()
.domain([0, max(dataset)])
.range(['blue', 'orange'])