Key Commands
\l list all databases
\c <db name> connect/switch to a certain database
\dt list all tables in the current db
General
\copyright show PostgreSQL usage and distribution terms
\crosstabview [COLUMNS] execute query and display results in crosstab
\errverbose show most recent error message at maximum verbosity
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
/** | |
* querySelectorAll with regex support. | |
* TS version: https://gist.github.com/sagirk/3240407ebbc9369356759a806b66fe34. | |
* | |
* Note: In the `attributeToSearch` parameter's absence, all attributes on all | |
* DOM nodes will be searched. This can get quite expensive for large DOM trees. | |
* | |
* Usage example: | |
* `querySelectorAllRegex(/someregex/, 'target-specific-attribute-if-needed');` | |
* |
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
/** | |
Taken from: http://stackoverflow.com/questions/588040/window-onload-vs-document-onload | |
According to Parsing HTML documents - The end, | |
The browser parses the HTML source and runs deferred scripts. | |
A DOMContentLoaded is dispatched at the document when all the HTML has been parsed and have run. The event bubbles to the window. | |
The browser loads resources (like images) that delay the load event. | |
A load event is dispatched at the window. | |
Therefore, the order of execution will be | |
DOMContentLoaded event listeners of window in the capture phase | |
DOMContentLoaded event listeners of document |
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 { useCallback, useState } from "react"; | |
import { useMap } from "./useMap"; | |
import { useSearch } from "./useSearch"; | |
export default function AppleMap() { | |
const { mapkit, map, mapRef } = useMap(); | |
const search = useSearch(); | |
const [value, setValue] = useState(""); | |
const [adressesList, setAddressesList] = useState(null); |
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
#!/bin/bash | |
#https://www.libvips.org/install.html | |
VERSION="8.12.2" | |
echo "" | |
echo "---------------------------------" | |
echo "| AUTO COMPILE LIBVIPS |" | |
echo "---------------------------------" | |
echo "" | |
echo "-----------------------" | |
echo "Installing cgif" |
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
alias nx='/bin/bash ~/.scripts/nx.sh' # NginX scripts |
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
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb | |
index bfb1ea4..eaa2557 100644 | |
--- a/ext/openssl/extconf.rb | |
+++ b/ext/openssl/extconf.rb | |
@@ -104,6 +104,15 @@ have_func("OPENSSL_cleanse") | |
have_func("SSLv2_method") | |
have_func("SSLv2_server_method") | |
have_func("SSLv2_client_method") | |
+have_func("SSLv3_method") | |
+have_func("SSLv3_server_method") |
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
# Startup script for Ubuntu 17.04 VPS on Vultr (Dev machine and cloud server) | |
# add a new user @todo: make this a one-liner | |
# adduser stvhwrd | |
# usermod -aG sudo stvhwrd | |
## MANUALLY LOG OUT AS ROOT AND LOG IN AS NEW USER | |
# OPTIONAL: to add ssh key, assuming that you have ssh-copy-id installed on local machine and your keypair is in ~/.ssh and named id_rsa: | |
# Locally, i.e. on your laptop. eg. ssh-copy-id stvhwrd@45.63.10.205 |
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
#!/bin/bash | |
cat << EOF | |
#=============================================================================# | |
# Startup Boot Script # | |
# --------------------------------------------------------------------------- # | |
# Platform : Vultr VPS (Debian 9) # | |
# Author : KaiserKatze <donizyo@gmail.com> # | |
# --------------------------------------------------------------------------- # | |
# This startup script is saved to `/tmp/firstboot.exec` after execution. # |
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
#!/bin/sh | |
# Based on instructions from | |
# https://docs.dash.org/en/stable/masternodes/setup-testnet.html | |
# | |
# See https://www.vultr.com/docs/vultr-startup-scripts-quickstart-guide | |
# for details of using Vultr startup scripts | |
# Add new user | |
USERNAME=yourusernamehere # Username to create |
NewerOlder