This is the code you need to align images to the left:
import requests | |
import json | |
url = "http://localhost:8080" | |
data = {'key': 'value'} | |
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'} | |
r = requests.post(url, data=json.dumps(data), headers=headers) |
docker container run \ | |
-e [email protected] \ | |
-e PGADMIN_DEFAULT_PASSWORD=123456 \ | |
-p 80:80 \ | |
dpage/pgadmin4 | |
# pgAdmin4 will be available on http://localhost:80 |
# This gist is based on https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a | |
# Download the ESLint and Prettier extensions for VSCode. | |
code --install-extension esbenp.prettier-vscode | |
code --install-extension dbaeumer.vscode-eslint | |
# Install the ESLint and Prettier libraries into our project. In your project’s root directory, you will want to run: | |
npm install -D eslint prettier | |
# Install the Airbnb config. If you’re using npm 5+, you can run this shortcut to install the | |
# config and all of its dependencies: |
# This gist is based on https://philna.sh/blog/2019/01/10/how-to-start-a-node-js-project/ | |
# 1. Configure your npm | |
npm set init.author.name "Your name" | |
npm set init.author.email "[email protected]" | |
npm set init.author.url "https://your-url.com" | |
npm set init.license "MIT" | |
npm set init.version "1.0.0" | |
# 2. Include this function to your bash_profile, e.g. ~/.zshrc | |
function create-node { |
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" | |
export ANDROID_HOME=$HOME/Library/Android/sdk | |
export PATH="$HOME/bin:/usr/local/bin:$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$PATH" | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/cbusa/.oh-my-zsh" | |
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
# functions |
function count_dir { | |
ls -1 $1 | wc -l | |
} |
do $$ | |
declare | |
data_values record; | |
begin | |
for data_values in (select * from table) | |
loop | |
update table | |
set column_value = (select column_value from another_table where id = data_values.id) | |
where id = data_values.id; | |
end loop; |
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
const React = (() => { | |
let hooks = []; | |
let idx = 0; | |
function useState(initValue) { | |
let state = hooks[idx] || initValue; | |
let _idx = idx; | |
let setState = (newValue) => { | |
hooks[_idx] = newValue; | |
}; |