This set of instructions goes with this presentation deck.
yum install postgis24_10
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) |
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; |
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, |
#!/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...] |
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
#!/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 |
package.json
, set version
to a prerelease version, e.g. 2.0.0-rc1
, 3.1.5-rc4
, ...npm pack
to create packagenpm publish <package>.tgz --tag next
to publish the package under the next
tagnpm install --save package@next
to install prerelease packageWhen 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
function getData() { | |
var deferred = $.Deferred(); | |
$.ajax({ | |
'url': 'http://google.com', | |
'success': function(data) { | |
deferred.resolve('yay'); | |
}, | |
'error': function(error) { | |
deferred.reject('boo'); |