git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
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
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
bash-4.3# cat /proc/1/cpuset | |
/docker/13f8c221656e202db979d1e607c9c902282d8719ab70715978dd04ee6069d61e | |
bash-4.3# DOCKER_CID=$(cat /proc/1/cpuset | cut -c9-) | |
bash-4.3# echo $DOCKER_CID | |
13f8c221656e202db979d1e607c9c902282d8719ab70715978dd04ee6069d61e |
import { useState, useEffect } from 'react'; | |
export const useTypeWriter = (text, startNow = true, speed = 100, skip) => { | |
const [toBeTyped] = useState(text); | |
const [displayedText, setDisplayedText] = useState(''); | |
const [isDone, setIsDone] = useState(false); | |
const [intervalId, setIntervalId] = useState(null); | |
useEffect( | |
() => { |
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.pdf
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.epub
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.mobi
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.pdf
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.epub
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.mobi
import { useReducer, useEffect } from 'react'; | |
import { useSwipeable, SwipeableHandlers, EventData } from 'react-swipeable'; | |
function previous(length: number, current: number) { | |
return (current - 1 + length) % length; | |
} | |
function next(length: number, current: number) { | |
return (current + 1) % length; | |
} |
import { Dispatch, useReducer, useEffect } from "react"; | |
import { produce } from "immer"; | |
//======= | |
// State | |
//======= | |
export type ExampleState = { | |
name: string; | |
level: number; | |
saved: false; |