Skip to content

Instantly share code, notes, and snippets.

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 17, 2024 13:10
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%'
@RobertoSchneiders
RobertoSchneiders / deploy_with_ebcli3_on_circleci.md
Last active October 29, 2024 19:38
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.

If you are using the Circle CI 2.0, take a look at this article from ryansimms

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
    The aws user must have the right permissions. This can be hard, maybe, this can help you.
@jarpy
jarpy / requirements.txt
Last active June 30, 2022 06:28
Serverless Elasticsearch Curator for AWS Lambda
certifi==2016.8.8
elasticsearch-curator==4.0.6
PyYAML==3.11

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@sidharthkuruvila
sidharthkuruvila / data_holder.js
Created December 15, 2016 12:38
Migrate knex migrations to liquibase
exports.queries = [];
exports.holder = [];
@deepakputhraya
deepakputhraya / Postresql Migrate from 9.4 to 9.6.md
Last active March 4, 2017 08:34
Migrating from Postgreql from 9.4 to 9.6 with very simple commands. This technique will work if anyone wants to migrate to different versions. This requires down time

Postgresql backup before migrating

pg_dumpall > backup.out

Install Postgresql 9.6

For Ubuntu 14.04

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
@deepakputhraya
deepakputhraya / box_spare5.json
Last active September 7, 2017 04:45
JSON structures: Annotating Bounding Boxes. Polygons and Cuboids by Spare5 and scaleapi
{
"points": {
"p6": [0.232, 0.26986507],
"p7": [0.77066667, 0.26986507],
"p8": [0.77066667, 0.46626687],
"p9": [0.232, 0.46626687]
},
"cv_objects": {
"0EAF8033-9501-6BC2-9653-E40CE148D301": {
"closed": true,