Skip to content

Instantly share code, notes, and snippets.

View marcoemorais's full-sized avatar

Marco Morais marcoemorais

  • Yahoo!, AWS, NVIDIA
  • Santa Clara
View GitHub Profile
@afolarin
afolarin / docker-log-gist.md
Last active March 16, 2023 13:02
docker-logs
@martijnvermaat
martijnvermaat / ssh-agent-forwarding-screen.md
Created December 21, 2013 15:06
SSH agent forwarding and screen

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@yihuang
yihuang / uwsgi-gevent-benchmark.rst
Last active July 17, 2019 10:20
uwsgi gevent benchmark
CPU:Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz (X8)
OS:debian7
PYTHON:python2.7.3
GEVENT:gevent-1.0rc1
UWSGI:1.9.15-dev

hello world

@willurd
willurd / web-servers.md
Last active May 10, 2025 14:01
Big list of http static server one-liners

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
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 8, 2025 09:19
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@weakish
weakish / backup-providers.md
Last active August 30, 2024 09:57
reviews of vps, storage, mail forward