This file contains hidden or 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
| // Copyright 2016 Russell Haering et al. | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // https://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or 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
| let preventThisKey = (e) => { | |
| if (Array.from(document.querySelectorAll('button[data-state="absent"]')).map((el) => el.innerText.toLowerCase()).includes(e.key)) { | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| } | |
| }; | |
| document.addEventListener("keydown", preventThisKey); |
This file contains hidden or 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 groupsOf = | |
| (number = 0) => | |
| (arr = []) => { | |
| return arr.reduce( | |
| (acc, curr, idx) => { | |
| const step_ = acc.step.concat(curr); | |
| if (idx === arr.length - 1 || step_.length === number) { | |
| return { final: acc.final.concat([step_]), step: [] }; | |
| } | |
| return { final: acc.final, step: step_ }; |
This file contains hidden or 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
| sections: | |
| - name: Skills | |
| items: | |
| - name: Frontend Engg | |
| description: Next.js, React, Vue, Elm, GraphQL, Typescript, HTML/CSS. | |
| - name: Backend Engg | |
| description: NodeJS, Express, API design, SQL. | |
| - name: Product Engg | |
| description: Idea, wireframing, UX, testing. | |
| - name: Management |
This file contains hidden or 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
| module Codegen exposing (..) | |
| import Elm.Parser as Parser | |
| import Elm.Processing as Processing | |
| import Elm.Syntax.Declaration exposing (Declaration(..)) | |
| import Elm.Syntax.Node exposing (Node, value) | |
| import Elm.Syntax.TypeAnnotation exposing (TypeAnnotation(..)) | |
| sampleString = |
This file contains hidden or 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
| seqMaybe : List (Maybe a) -> Maybe (List a) | |
| seqMaybe list = | |
| let | |
| go : List (Maybe a) -> Maybe (Array a) -> Maybe (Array a) | |
| go l acc = | |
| case l of | |
| [] -> | |
| acc | |
| head :: tail -> |
This file contains hidden or 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
| #!/bin/bash | |
| ### Set initial time of file and the path to file/directory | |
| LTIME=`stat src/*` | |
| while true | |
| do | |
| ATIME=`stat src/*` | |
| if [[ "$ATIME" != "$LTIME" ]] | |
| then |
This file contains hidden or 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
| type MapObject = <A, B>(fn: (a: A) => B) => | |
| <C extends {[key: string]: A }>(obj: C) => { [key in keyof C]: B} | |
| export const mapObject: MapObject = (fn) => (obj) => { | |
| if (!obj) return {}; | |
| const kvPairs = Object.entries(obj); | |
| const mapped = kvPairs.map((kvPair) => [kvPair[0], fn(kvPair[1])]); | |
| return Object.fromEntries(mapped); | |
| }; |
This file contains hidden or 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
| // config yaml/json | |
| // this decides the layout, the items that go into a component's props etc | |
| pages: | |
| - name: clusters | |
| title: Clusters | |
| layout: type2 | |
| children: | |
| - name: clusters-scatterplot | |
| component: Chart | |
| props: |
This file contains hidden or 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
| pixel ratio 1 | |
| ------------- | |
| 320 x 480 | |
| 360 x 640 | |
| 480 x 854 | |
| 600 x 1024 | |
| 720 x 1280 | |
| 768 x 1024 |
NewerOlder