Skip to content

Instantly share code, notes, and snippets.

View rplaurindo's full-sized avatar
🎯
Focusing

Rafael rplaurindo

🎯
Focusing
  • Rio de Janeiro - RJ, Brasil
View GitHub Profile
@rplaurindo
rplaurindo / 1 - requirements.sh
Last active September 27, 2015 19:43
Programando em Android
# Instalar JDK 6 ou superior. JDK é o acronimo de Java Development Kit, ou seja, Kit de desenvolvimento Java.
# Contém o seu compilador "javac" e suas bibliotecas nativas.
# Instalando o JDK 7 no Ubuntu 13.10 (Saucy Salamander) ou superior
# Requiriments for 64 bits version
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386 lib32ncurses5-dev lib32stdc++6 icedtea6-plugin
-- SQLite
DELETE FROM [table]
DELETE FROM sqlite_sequence
# Estarta o servidor python na aplicação
$ python -m SimpleHTTPServer <port>
# Guia de Instalação: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Using-TinyTDS
# requirements
# freetds-dev
$ sudo apt-get install -fyu freetds-dev
# Intale as gems "tiny_tds" e "activerecord-sqlserver-adapter"
# Obs.: O método "set_table_name" poderá ser usado para definir um outro nome para as tabelas no modelo

FTP

VSFTPD

Instalation

$ sudo apt-get install -fyu vsftpd

Configuration

#include <stdio.h>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(){
FILE *pont_arq;
char palavra[20];

Working with PostgresSQL

Requirements

  • libpq-dev

Installing

$ sudo apt-get install -fy postgresql

Installing

For the Java works, you should install the JDK (Java Development Kit) and the JRE (Java Runtime Environment).

The JDK is the VM (Virtual Machine) of the Java. It’s responsible for compile the source code that will be executed.

The JRE is responsible for the environment, how to define variables and read them.

  • JDK

Generating

Run:

$ rails plugin new <name>

To generate a isolated engine use --mountable

The .rb file generated in folder lib should have the same name of the gem, otherwise it will not load automatically.

# list generators
$ rails generate

# É importante fazermos algumas considerações para os casos de se trabalhar com namespace:
# O nome do arquivo com _generator.rb deve ter o mesmo nome da classe;
  # sample_generator.rb => class SampleGenerator
  # A classe deve ficar numa pasta com o nome do primeiro módulo;

# lib/generators/error_page/install_generator.rb

module ErrorPage