Skip to content

Instantly share code, notes, and snippets.

View hackvan's full-sized avatar
🇨🇴

Diego Camacho hackvan

🇨🇴
View GitHub Profile
@ppdeassis
ppdeassis / oracle_reader.rb
Created June 18, 2013 14:35
A Ruby class to acces an Oracle database
################################################################################
require 'oci8'
require 'iconv'
################################################################################
class OracleReader
################################################################################
def initialize(server, username, password)
# Open the connection.
@connection = OCI8.new(username, password, server)
@toronya
toronya / oracle_to_csv.rb
Last active December 29, 2015 22:20
simple example of DB table to csv (oracle)
# coding:utf-8
# usage: ruby oracle_to_csv.rb > sample.csv
require 'rubygems'
require 'oci8' # before you need install : gem install ruby-oci8
def csvout(user, pass, world, sql)
begin
ora = OCI8.new(user,pass,world)
c = ora.exec(sql)
@daicham
daicham / gist:4109527
Created November 19, 2012 08:08
A sample ruby code of executing SQL for Oracle
# encoding: utf-8
#
# Prerequisite:
# gem install ruby-oci8
require 'oci8'
def log(message)
puts "#{Time.now.strftime("%Y-%m-%d %H:%M:%S")} #{message}"
end
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@tsabat
tsabat / zsh.md
Last active October 10, 2025 00:44
Getting oh-my-zsh to work in Ubuntu
@lucolivier-dumaisblais
lucolivier-dumaisblais / OOP.pls
Created April 1, 2011 02:11
Example of Object-oriented programming in PL/SQL
DROP TYPE Student;
DROP TYPE Person;
CREATE OR REPLACE TYPE Person As Object (
firstName VARCHAR2(30),
lastName VARCHAR2(30),
phoneNumber CHAR(10)
) NOT FINAL;
/
CREATE OR REPLACE TYPE Student UNDER Person (