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
@d-asensio
d-asensio / how_many_ways.ts
Created September 25, 2016 15:21
Sundio - Exercice 2
namespace Sundio {
/**
* Computes how many ways someone can use to climb a given number of stairs by
* doing it in groups of two or one stair at time.
*
* @param stairs The number of stairs to climb.
* @returns The number of ways someone can climb the stairs.
*/
export function howManyWays(stairs: number): number {
// For known values, return the result directly.
@d-asensio
d-asensio / travese.ts
Last active September 25, 2016 17:13
Sundio - Excercice 1
namespace Sundio {
/**
* Node
*
* A simple implementation of a binary node.
*/
export class Node <T> {
private _n: T;
private _lSon: Node <T>;
@d-asensio
d-asensio / graph_coloring.ts
Last active September 25, 2016 17:20
Sundio - Exercice 5
/// <reference path="./typings/globals/node/index.d.ts" />
namespace Sundio {
/**
* Vertex
*/
export class Vertex {
private _color: number;
private _links: Vertex [];
@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 + ',';
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
@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.
@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,