Skip to content

Instantly share code, notes, and snippets.

View davidmatas's full-sized avatar
🏠
Working from home

David Matas davidmatas

🏠
Working from home
View GitHub Profile
@davidmatas
davidmatas / mou.html
Last active March 1, 2023 16:42
highlight syntax for Mou.app
<!-- 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>
@davidmatas
davidmatas / viewunits.scss
Created June 8, 2016 12:34 — forked from seavor/viewunits.scss
Sass Mixin for V-Units to PXs for unsupported devices (vw, vh, vmin, vmax)
@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
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', () => {
import { constructor } from "mocha";
export default class GameOfLive {
}
type Dead = 0
type Alive = 1
type CellStatus = Dead | Alive;
@davidmatas
davidmatas / index.js
Created June 27, 2024 15:50
Postmortem Document
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;