This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Highlight syntax for Mou.app, insert at the bottom of the markdown document --> | |
<script src="http://yandex.st/highlightjs/7.3/highlight.min.js"></script> | |
<link rel="stylesheet" href="http://yandex.st/highlightjs/7.3/styles/github.min.css"> | |
<script> | |
hljs.initHighlightingOnLoad(); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function vunit($input, $width, $height){ | |
@if unit($width) != px or unit($height) != px { | |
@error "function vunit() dimensions should contain a px unit. +[" + $width + ", " + $height +"]"; | |
} | |
// Store $input unit | |
$unit: unit($input); | |
// Remove unit from $input and convert to ratio | |
$ratio: $input / ($input * 0 + 1) / 100; | |
// Calc and store return values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import should from 'should'; | |
import GameOfLife, { Cell } from '../../src/GameOfLife'; | |
// 1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation. | |
// 2. Any live cell with more than three live neighbours dies, as if by overcrowding. | |
// 3. Any live cell with two or three live neighbours lives on to the next generation. | |
// 4. Any dead cell with exactly three live neighbours becomes a live cell. | |
describe('GameOfLife', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { constructor } from "mocha"; | |
export default class GameOfLive { | |
} | |
type Dead = 0 | |
type Alive = 1 | |
type CellStatus = Dead | Alive; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Client } = require('@notionhq/client'); | |
// Configura tu cliente de Notion con el token de integración | |
const notion = new Client({ auth: process.env.NOTION_API_KEY }); | |
// ID de la página fuente de Notion de la que se copiarán los children | |
const sourcePageId = process.env.NOTION_SOURCE_PAGE_ID; | |
// ID de la base de datos de Notion donde se creará la nueva página | |
const databaseId = process.env.NOTION_DATABASE_ID; |