Skip to content

Instantly share code, notes, and snippets.

View juliolvfilho's full-sized avatar

Júlio Filho juliolvfilho

View GitHub Profile
@willurd
willurd / web-servers.md
Last active February 27, 2024 22:29
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
View read-access.sql
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@tr4nk
tr4nk / curl-with-sftp-https.md
Created January 6, 2018 05:58
Install curl with sftp and https support on Ubuntu
View curl-with-sftp-https.md
  • Download latest curl
  • Manual install curl:
sudo apt install libssh2-1-dev libssl-dev
cd curl/
./configure --with-ssl --with-libssh2
make
sudo make install
  • Test installation: