Skip to content

Instantly share code, notes, and snippets.

View tfoldi's full-sized avatar

Földi Tamás tfoldi

View GitHub Profile
@tfoldi
tfoldi / t__keyspace.cpp
Created May 2, 2010 11:17
Test cases for memcached vs keyspaced comparsion
#include <codesloop/common/test_timer.h>
#include <codesloop/common/logger.hh>
#include <codesloop/common/common.h>
#include <keyspace_client.h>
#include <assert.h>
#include <vector>
@tfoldi
tfoldi / yxlan_cron.rb
Created May 18, 2010 10:49
smbclient based sync between windows and unix
#!/usr/bin/ruby
#
# Foldi Tamas <tfoldi@xsi.hu>, BSDL
require "yaml"
# read configuration
@yxlan_dir = File.dirname($0) + "/../"
@conf = YAML::load_file( @yxlan_dir + 'etc/yxlon.conf' )
@filename = @yxlan_dir + "log/yxlon_cron.log"
CREATE OR REPLACE PACKAGE BODY ISZMETL.etl_employee IS
PROCEDURE main( p_params param_list DEFAULT NULL ) IS
v_params obj_param := iszmk.obj_param( p_plist => p_params );
v_logger obj_logger;
v_stmt VARCHAR2( 100 );
BEGIN
/*** AUTOMATICALLY GENERATED PROCEDURE ***/
/*** DO NOT CHANGE IT ***/
v_start_date := sysdate;
%YAML 1.1
---
VERSION: 1.0.0.1
DEFINE:
- INPUT:
NAME: book
FILE:
# change seghostname and file_path to reflect your
# runtime file location
@tfoldi
tfoldi / Makefile
Created September 15, 2010 12:46
Greenplum MapReduce function written in C language
wordcount:
cc -g -ggdb -shared -o wordcount.so wordcount.c -I`pg_config --includedir-server` -I`pg_config --pkgincludedir`/internal -I`pg_config --pkgincludedir` -fPIC
@tfoldi
tfoldi / geomean.sql
Created October 7, 2010 14:53
Aggregate function for geometric mean (GEOMEAN) for Oracle RDBMS
ALTER SESSION SET plsql_compiler_flags = 'NATIVE';
--
ALTER TYPE geomean_impl COMPILE;
--
CREATE FUNCTION geomean( input NUMBER )
RETURN NUMBER
PARALLEL_ENABLE
AGGREGATE USING geomean_impl;
@tfoldi
tfoldi / dim_cndn_abap.abap
Created December 6, 2011 09:28
KONV extract SAP Download
REPORT ZAL_ABAP message-id 26 line-size 255
no standard page heading.
* Y_XI_G00D_KONV_FASTFULL_2.
PARAMETER $PARAM1 TYPE I.
PARAMETER DOWNLOAD(1) DEFAULT 'N' lower case. "N-svr,Y-clnt
PARAMETER EXECMODE(1) DEFAULT 'B' lower case. "D-dlg,B-btch
PARAMETER OUT_DIR(48) DEFAULT "output file dir
'/dwacta/out/LD2' lower case.
PARAMETER IN_DIR(48) DEFAULT "input file dir
'/dwacta/out/LD2' lower case.
CREATE TABLE emp (
name text,
age integer,
salary numeric(10,2)
);
CREATE OR REPLACE FUNCTION get_emps(float8) RETURNS SETOF emp AS '
names <- c("Joe","Jim","Jon")
ages <- c(41,25,35)
salaries <- c(250000,120000,50000)
@tfoldi
tfoldi / tableau.rb
Created April 24, 2013 07:56
This ruby class can logon and invoke REST API URLs in Tableau server. Authentication is done by using RSA crpyto stuff.
require 'httpclient'
module TableauLDAPSync
class Tableau
def initialize(server_url)
proxy = ENV['HTTP_PROXY']
@http_client = HTTPClient.new(proxy)
@http_client.set_cookie_store("cookie.dat")
# put this file to the apache\conf directory
# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module modules/mod_jk.so
# Declare the module for <IfModule directive> (remove this line on Apache 2.x)
#AddModule mod_jk.c
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)