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
// This file assures that a Jest test file and Cypress test file exists for each component. | |
import path from "path"; | |
import fs from "fs"; | |
function getFiles(filepath: string) { | |
return fs.readdirSync(filepath).filter(function (file) { | |
return fs.statSync(path.join(filepath, file)).isFile(); | |
}); | |
} |
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
import "./styles.css"; | |
import { Person } from "./types"; | |
import { Listbox } from "./listbox/listbox"; | |
import { useForm } from "react-hook-form"; | |
const people: Person[] = [ | |
{ id: 1, name: "Durward Reynolds", unavailable: false }, | |
{ id: 2, name: "Kenton Towne", unavailable: false }, | |
{ id: 3, name: "Therese Wunsch", unavailable: false }, | |
{ id: 4, name: "Benedict Kessler", unavailable: true }, |
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
<link rel="shortcut icon" width=32px> | |
<canvas style="display: none" id="loader" width="16" height="16"></canvas> | |
<script> | |
class Loader { | |
constructor(link, canvas) { | |
this.link = link; | |
this.canvas = canvas; | |
this.context = canvas.getContext('2d'); | |
this.context.lineWidth = 2; |
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
// ---------------------------------------------------------------------- | |
// Smart wrapper around Next.js <Link> | |
// | |
// This is to improve the default handling of Next.js dynamic links which | |
// requires both `href` and `as` props. | |
// This improvement enables the following usage: | |
// | |
// <Link page="/users/[id]" params={{ id: user.id }}>{user.name}</Link> | |
// | |
// <Link page="/blog/[...slug]" params={{ slug: ['coffee', 'frenchpress'] }}>View Here</Link> |
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
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore fix" |
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
# Modified slightly from https://twitter.com/mathias/status/1045312837671882752 | |
git reset $(git commit-tree HEAD^{tree} -m 'first commit') |
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
image: lorisleiva/laravel-docker:latest | |
phpunit: | |
stage: test | |
script: | |
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts | |
- cp .env.example .env | |
- php artisan key:generate | |
- phpunit --colors=never |
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 trackTime = timing => { | |
const now = performance.now(); | |
if (!timing.startTime) timing.startTime = now; | |
const elapsed = now - timing.startTime; | |
const {duration} = timing; | |
if (duration != null && duration <= elapsed) timing.startTime = null; | |
return elapsed; | |
}; | |
const delay = (callback, duration) => { |
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
- var images = [ 'https://static.pexels.com/photos/5938/food-salad-healthy-lunch-medium.jpg', 'https://static.pexels.com/photos/5927/food-salad-red-lunch-large.jpg', 'https://static.pexels.com/photos/6118/food-water-corn-cooking-medium.jpg', 'https://static.pexels.com/photos/5876/food-salad-healthy-vegetables-medium.jpg', 'https://static.pexels.com/photos/5928/salad-healthy-diet-spinach-medium.jpg']; | |
.container | |
ul.posts | |
each img in images | |
li.post | |
.post-content | |
header: a(href="https://twitter.com/@kamciesla") @kamciesla posted this | |
img(src=img) | |
footer | |
a(href="https://kamilciesla.pl") |
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
Puts on glasses: | |
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) | |
Takes off glasses ("mother of god..."): | |
(⌐■_■) | |
( •_•)>⌐■-■ |
NewerOlder