import { Hono } from "hono";
import PDFDocument from "pdfkit";
const app = new Hono();
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 cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
left_image_address = '/home/deveshdatwani/Desktop/left.jpg' | |
right_image_address = '/home/deveshdatwani/Desktop/right.jpg' | |
left_image = cv2.imread(left_image_address, cv2.IMREAD_GRAYSCALE) | |
right_image = cv2.imread(right_image_address, cv2.IMREAD_GRAYSCALE) |
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 { forwardRef } from 'react'; | |
import { LinkCore, LinkCoreProps } from 'solito/link'; | |
import { AnchorProps, styled, Anchor } from 'tamagui'; | |
const StyledTextLink = styled(Anchor, { | |
name: 'TextLink', | |
}); | |
export type TextLinkProps = Pick<LinkCoreProps, 'href' | 'target'> & | |
AnchorProps; |
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 React, { ComponentProps } from 'react' | |
import { ScrollView } from 'react-native' | |
import { useDraggableScroll } from './use-draggable-scroll' | |
export const DraggableScrollView = React.forwardRef< | |
ScrollView, | |
ComponentProps<typeof ScrollView> | |
>(function DraggableScrollView(props, ref) { | |
const { refs } = useDraggableScroll<ScrollView>({ | |
outerRef: ref, |
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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
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
CREATE EXTENSION IF NOT EXISTS "unaccent" | |
CREATE OR REPLACE FUNCTION slugify("value" TEXT) | |
RETURNS TEXT AS $$ | |
-- removes accents (diacritic signs) from a given string -- | |
WITH "unaccented" AS ( | |
SELECT unaccent("value") AS "value" | |
), | |
-- lowercases the string | |
"lowercase" AS ( |
This set of instructions goes with this presentation deck.
yum install postgis24_10
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
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
- Update
package.json
, setversion
to a prerelease version, e.g.2.0.0-rc1
,3.1.5-rc4
, ... - Run
npm pack
to create package - Run
npm publish <package>.tgz --tag next
to publish the package under thenext
tag - Run
npm install --save package@next
to install prerelease package
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
NewerOlder