Skip to content

Instantly share code, notes, and snippets.

View HudsonAfonso's full-sized avatar
:octocat:
Focusing

Hudson Afonso HudsonAfonso

:octocat:
Focusing
View GitHub Profile
@HudsonAfonso
HudsonAfonso / HelloWorld.ts
Created July 28, 2019 13:36 — forked from up1/HelloWorld.ts
TDD with TypeScript
export class HelloWorld {
public sayHi(name: string): string {
return "Hi, " + name;
}
}
@HudsonAfonso
HudsonAfonso / how-to-copy-aws-rds-to-local.md
Created July 20, 2019 13:09 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
class _MyAppState extends State<MyApp> {
import javax.xml.bind.DatatypeConverter;
import java.io.IOException;
import java.net.*;
import java.util.Collections;
import java.util.Enumeration;
public class Companytec {
public static void main(String[] args) throws IOException {
http://ltxfaq.custhelp.com/app/answers/detail/a_id/644?_ga=2.51686441.148032218.1542103852-1766834869.1542103852
import javax.xml.bind.DatatypeConverter;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.net.NetworkInterface;
public class Companytec {
public static void main(String[] args) throws IOException {

Keybase proof

I hereby claim:

  • I am hudsonafonso on github.
  • I am hafonso (https://keybase.io/hafonso) on keybase.
  • I have a public key ASBemFi9HQbyOA3c5MOyYgtI24NNPmm9wCWVqT0Kpq_AlQo

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns3:recepcionarLoteRps xmlns:ns3="http://ws.issweb.fiorilli.com.br/"><EnviarLoteRpsEnvio xmlns="http://www.abrasf.org.br/nfse.xsd"><LoteRps Id="L3000" versao="2.01"><NumeroLote>3000</NumeroLote><CpfCnpj><Cnpj>01001001000113</Cnpj></CpfCnpj><InscricaoMunicipal>1.000.10</InscricaoMunicipal><QuantidadeRps>1</QuantidadeRps><ListaRps><Rps><InfDeclaracaoPrestacaoServico Id="I3000"><Rps><IdentificacaoRps><Numero>1</Numero><Serie>A</Serie><Tipo>1</Tipo></IdentificacaoRps><DataEmissao>2014-10-02-03:00</DataEmissao><Status>2</Status></Rps><Competencia>2014-10-02-03:00</Competencia><Servico><Valores><ValorServicos>123</ValorServicos></Valores><IssRetido>2</IssRetido><ItemListaServico>01.05</ItemListaServico><Discriminacao>qwert</Discriminacao><CodigoMunicipio>3504800</CodigoMunicipio><CodigoPais>1058</CodigoPais><ExigibilidadeISS>1</ExigibilidadeISS></Servico><Prestador><CpfCnpj><Cnpj>01001001
{
"statuses": [
{
"metadata": {
"result_type": "recent",
"iso_language_code": "en"
},
"created_at": "Sat Jan 25 21:23:56 +0000 2014",
"id": 427190121373257700,
"id_str": "427190121373257728",
gem 'mongoid-paperclip', :require => 'mongoid_paperclip'