Skip to content

Instantly share code, notes, and snippets.

View facilita-tecnologia's full-sized avatar

Facilita Tecnologia facilita-tecnologia

View GitHub Profile
PostgreSQL database server provides pg_dump and psql utilities for backup and restore databases. This article will describe various ways to use of pg_dump command to backup database. Also you will learn how to restore datbase backup.
Backup and Restore Database in PostgreSQL
Below is some connections options which you can use for connecting remote server or authenticated server with all queries given in this article.
-d, –dbname=DBNAME database name
-h, –host=HOSTNAME database server hostname or ip
-p, –port=PORT database server port number (default: 5432)
-U, –username=NAME connect as specified database user
-W, –password force password prompt
@facilita-tecnologia
facilita-tecnologia / PhonecallReceiver.java
Created April 20, 2018 21:55 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
{
***************************************************
* A binary compatible SHA1 implementation *
* written by Dave Barton (davebarton@bigfoot.com) *
***************************************************
* 160bit hash size *
***************************************************
}
unit SHA1;
@facilita-tecnologia
facilita-tecnologia / kinghost_rails_deploy.sh
Created February 24, 2016 00:41 — forked from gustavokuklinski/kinghost_rails_deploy.sh
Script para deploy de Rails 3.2.17 nos servidores compartilhados da Kinghost Desenvolvido por Gustavo Kuklinski (@tuxlinski) - http://kuklinski.com.br
#!/bin/bash
#
# Script para deploy de Rails 3.2.17
# nos servidores compartilhados da Kinghost
# Desenvolvido por Gustavo Kuklinski (@tuxlinski)
# http://www.kuklinski.com.br
#
# Até o momento o Script apenas funciona caso você tenha mais de UMA aplicação
# criada pelo painel de controle!