Skip to content

Instantly share code, notes, and snippets.

View quannt's full-sized avatar
👁️‍🗨️
I may be slow to respond.

Quan quannt

👁️‍🗨️
I may be slow to respond.
View GitHub Profile
@quannt
quannt / lightbox
Created October 7, 2023 03:57
Lightbox plugins collection
Interaction
https://github.com/taye/interact.js
Out of the box solutions
https://photoswipe.com/styling/
https://github.com/dimsemenov/photoswipe-deep-zoom-plugin
https://openlayers.org/en/latest/examples/zoomify.html
https://openseadragon.github.io/
https://www.lightgalleryjs.com/
// Replace this with a relevant selector.
// If you use a tool that auto-generates classes,
// you can temporarily add an ID and select it
// with '#id'.
const selector = '.the-fixed-child';
function findCulprits(elem) {
if (!elem) {
throw new Error(
'Could not find element with that selector'
);
yarn add --dev --exact prettier
yarn add --dev eslint-config-prettier
yarn add --dev eslint-plugin-only-warn
npx mrm lint-staged
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
//requiring path and fs modules
const path = require('path');
const fs = require('fs');
const readline = require('readline');
//joining path of directory
const directoryPath = path.join(__dirname, 'srt');
const outputPath = path.join(__dirname, 'dfxp');
//passsing directoryPath and callback function
fs.readdir(directoryPath, {
@quannt
quannt / keybase.md
Created May 16, 2019 15:42
keybase.md

Keybase proof

I hereby claim:

  • I am quannt on github.
  • I am quannt (https://keybase.io/quannt) on keybase.
  • I have a public key ASCISBU3QYHKlZ-sU-F7xD4qXsw1yPbfF8Tn0TvEI8ozwQo

To claim this, I am signing this object:

Request URL: xxx
Request Method: POST
Status Code: 200 OK
Remote Address: xxx
Referrer Policy: no-referrer-when-downgrade
access-control-allow-origin: *
Connection: keep-alive
Content-Length: 131
Content-Type: application/x-thrift; protocol=TCOMPACT
Date: Mon, 30 Jul 2018 11:16:47 GMT
<template>
<input v-model="foo.bar"> // this will work
<input v-model="foo.bar.baz"> // this will work
</template>
<script>
export default {
....
data() {
return {
<template>
<input v-model="foo.bar"> // this will work
<input v-model="foo.bar.baz"> // Exception: cannot read property 'baz' of undefined
</template>
<script>
export default {
....
data() {
return {