Skip to content

Instantly share code, notes, and snippets.

View elstr's full-sized avatar
🍕
Working from home

Eleonora Lester elstr

🍕
Working from home
  • Buenos Aires
View GitHub Profile
@elstr
elstr / fix-sequelize-uuid-generation.js
Created December 16, 2019 21:25
Fix Sequelize UUID generation
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.sequelize.query('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";')
.then(() => {
return queryInterface.createTable('user', {
id: {
allowNull: false,
primaryKey: true,
type: Sequelize.DataTypes.UUID,
@elstr
elstr / .eslintrc.json
Last active October 28, 2019 14:42
Jest Config
{
"extends": ["airbnb", "plugin:prettier/recommended"],
"plugins": ["react", "emotion"],
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"jest": true
},
"settings": {
@elstr
elstr / git-tag-delete-local-and-remote.sh
Created October 24, 2019 17:38 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@elstr
elstr / nprogress.css
Created October 24, 2019 13:32
NProgress bar css
/* Make clicks pass-through */
#nprogress {
pointer-events: none;
}
#nprogress .bar {
background: red;
position: fixed;
z-index: 1031;
top: 0;
@elstr
elstr / css-media-queries-cheat-sheet.css
Created September 25, 2019 21:15 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@elstr
elstr / media-query.css
Created September 18, 2019 19:19 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@elstr
elstr / config-eslint.md
Last active September 12, 2019 16:47
Config ESLint
  1. In your project root run npx install-peerdeps --dev eslint-config-airbnb
  2. Add .eslintrc file to your project
  3. Add baselines to you .eslintrc file with whatever you like (e.g. Airbnb)
// Use this file as a starting point for your project's .eslintrc.
// Copy this file, and add rule overrides as needed.
{
  "extends": "airbnb"
}
@elstr
elstr / airports.json
Created August 24, 2019 00:17 — forked from tdreyno/airports.json
JSON data for airports and their locations
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
@elstr
elstr / ObjectDistruct.tsx
Created June 12, 2019 19:01
Object destruct typescript
interface AppContextInterface {
route: String
updateRouter: (route: String) => void
}
class Layout extends Component {
buildHeader({ route, updateRouter }: AppContextInterface) {
// ....
}
@elstr
elstr / getResultsFromGoogleTypeAhead.js
Created June 10, 2019 22:54
Get results from google autocomplete service
/**
* input: string
* output: array of results
* @param {string} input
*/
export const getResultsFromGoogleTypeAhead = input => {
const service = new window.google.maps.places.AutocompleteService()
return new Promise(resolve => {
return service.getPlacePredictions({ input }, (predictions, status) => {
status === window.google.maps.places.PlacesServiceStatus.OK