Skip to content

Instantly share code, notes, and snippets.

View sarsena's full-sized avatar
:shipit:
Shipping All The Things

Steven Arsena sarsena

:shipit:
Shipping All The Things
View GitHub Profile
anonymous
anonymous / application.rb
Created December 20, 2012 15:40
Oracle Method
#Oracle.new(YOUR SELECT STATEMENT, VARIABLE ARRAY you want)
query = Oracle.new("SELECT name, department, employee_id from SCHEMA.TABLE_NAME", "v_array")
query.select
$v_array.each { |rows|
name = rows[0]
dept = rows[1]
employee_id = rows[2].to_i
require 'niftp'
class SomeObject
include NiFTP
def ftp_stuff
# get a file from an FTP Secure (FTPS) server
ftp("ftp.appareldownload.com", { username: "changeme", password: "changeme", ftps: true }) do |client|
p "Connected to Alpha! Buyakasha!"
files = client.list('s*')