Skip to content

Instantly share code, notes, and snippets.

View d-asensio's full-sized avatar
🤿
Working or diving

David Asensio Cañas d-asensio

🤿
Working or diving
View GitHub Profile
import React, { useEffect, useState, useRef } from 'react'
import PropTypes from 'prop-types'
import styled, { css } from 'styled-components'
import get from 'lodash.get'
import { useLockBodyScroll } from 'react-use'
import { Portal } from '../Portal'
import { Backdrop } from '../Backdrop'
class SkipListOptimizer {
private nItemsInList: number
constructor (nItemsInList: number) {
this.nItemsInList = nItemsInList;
}
public optimalLevels () {
const { floor, pow, log10 } = Math;
return floor(
@d-asensio
d-asensio / primary-description-list.jsx
Last active March 23, 2018 16:29
DescriptionList component interface implemented with styled-system
const PrimaryDescriptionList = () => (
<DescriptionList
flexDirection={['column', 'row']}
>
<DescriptionList.Item
mr={[0, 4]}
>
<DescriptionList.Label>Label 1</DescriptionList.Label>
<DescriptionList.Detail>Detail 1</DescriptionList.Detail>
</DescriptionList.Item>
import { BaseTheme, Theme, ThemeManager } from 'styled-responsive-theming'
import Button from './Button'
const breakpoints = [
480,
600,
840,
960,
1280,
@d-asensio
d-asensio / personal_goals.md
Created March 5, 2018 08:51
Here is where I set my personal goals, things I want lo learn, and stuff I want to do.
const fs = require('fs-extra')
const path = require('path')
const chalk = require('chalk')
const scissors = require('scissors')
const INPUT_FOLDER = './input/'
const OUTPUT_FOLDER = './output/'
fs.readdirSync(INPUT_FOLDER).forEach(fileName => {
let pdf = scissors(path.join(INPUT_FOLDER, fileName))

Índex de formacions a Koobin

Sessió 1 (24/10/2017): Introducció a Node.js, npm i yarn

Continguts

  • Que és Node.js?
  • Que és npm?
  • Gestió de dependències
  • Semver
@function valueToJSON($value, $key) {
$is_first_value: true;
$json_string: '{#{$key}:{';
@if (type-of($value) == 'map') {
$json_string: $json_string + '{';
@each $_key, $_value in $value {
@if not($is_first_value) {
$json_string: $json_string + ',';