Skip to content

Instantly share code, notes, and snippets.

/**
*Submitted for verification at Etherscan.io on 2022-12-07
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)
/**
@luckylu
luckylu / gist:981db2d4f723ad355c23c6a6bf038531
Created January 14, 2021 06:04
create readonly user on postgresql 9
CREATE USER readonly WITH ENCRYPTED PASSWORD 'readonly';
GRANT USAGE ON SCHEMA public to readonly;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readonly;
-- repeat code below for each database:
GRANT CONNECT ON DATABASE foo to readonly;
\c foo
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readonly; --- this grants privileges on new tables generated in new database "foo"
GRANT USAGE ON SCHEMA public to readonly;
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
echo "* Updating system"
apt-get update
apt-get -y upgrade
echo "* Installing packages"
apt-get --force-yes install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop libreadline6-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake bison libffi-dev
id -u deploy &> /dev/null
if [ $? -ne 0 ]
then