Skip to content

Instantly share code, notes, and snippets.

View AMHZR's full-sized avatar
🎯
Focusing

Aamir Hussain AMHZR

🎯
Focusing
View GitHub Profile
@iedmrc
iedmrc / docker-compose.yml
Last active May 20, 2023 20:48
docker-compose file for the "VROOM with OSRM backend" stack. https://dev.to/iedmrc/vehicle-routing-problems-and-how-to-solve-them-8h3
version: "3"
services:
osrm:
container_name: osrm
image: osrm/osrm-backend
restart: always
ports:
- "5000:5000"
volumes:
- ./osrm:/data
@dave1010
dave1010 / bamboo-install.sh
Last active February 23, 2017 23:19
Setup Bamboo
#!/bin/bash
# bamboo
mkdir /opt/atlassian
wget -O /opt/atlassian/bamboo.tar.gz http://www.atlassian.com/software/bamboo/downloads/binary/atlassian-bamboo-5.1.1.tar.gz
cd /opt/atlassian
tar xzf bamboo.tar.gz
mv atlassian* bamboo
mkdir /home/bamboo
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 14, 2024 11:33
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%'
@transaction.commit_on_success
def _action(action, o):
getattr(o,action)()
o.is_processing = False
o.save()
def _bulk_action(action, objs):
for o in objs:
_action(action,o)