Skip to content

Instantly share code, notes, and snippets.

KC KazChe

Block or report user

Report or block KazChe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
KazChe /
Created Aug 11, 2016
Pentaho PDI - User Defined Java Class - Simple Implementation
private FieldHelper fieldOne = null;
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
Object[] r = getRow();
if (r == null) {
return false;
View gist:392aeeca4363e2e7e9c5
curl -X POST --data <filename> http://<URL> -H "key:value>" -H "<if multiple headers>"
View gist:540045d212c14dee5b73
FROM centos:centos6
#Install WGET
RUN yum install -y wget
#Install tar
RUN yum install -y tar
# Download JDK
RUN cd /opt;wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"; pwd
KazChe / gist:a75a7d165649846fd50e
Created Dec 13, 2014
nodejs encrypt / decrypt
View gist:a75a7d165649846fd50e
var fs = require('fs'),
crypto = require('crypto'),
algorithm = 'aes-256-ctr',
password = 'd6F3Efeq',
payload = {
"id": "12345",
"description": "description",
"location": "123 street",
"userIdentity": {
"phoneNumber": "5550000000",
KazChe / request_template
Created May 2, 2014
View request_template
"phoneNumber": {
"countryCode": "",
"phoneNumber": ""
KazChe / swap.html
Created Mar 29, 2014
View swap.html
$('#moneyman').each(function() {
$("<button id='moneyman'><img src='/ap/resources/images/299.GIF' />).attr(
{ name:,
value: this.value
KazChe / loader.html
Created Mar 29, 2014
View loader.html
<div id="asyncCall" style="width: 10px;">
<input id="moneyman" style='width:190px;' type="button" value="Request Money">
<span id="asyncErrors" style="color:red;"></span>
KazChe / server.js
Created Mar 27, 2014
View server.js
var http = require('http'),
io = require(''),
sys = require('sys'),
express = require('express'),
fs = require('fs');
var port = 8111;
var app = express();
app.use(express.errorHandler({showStack: true, dumpExceptions: true}));
KazChe / main.js
Created Mar 27, 2014
View main.js
// This is important, the io.connect has to point where socket server
// is running - simple but took me while to connect the periods/dots/'s weekend, what am I doing?
var socket = io.connect('http://localhost:8111');
// image related socket
socket.on('user image', function(m){
// $('#imageReceivedMessage').text("> "+m);
$('#imageSentFromServer').attr('src', m);
KazChe / index.html
Created Mar 27, 2014
View index.html
<!doctype html>
<script src="//"></script>
<script src="http://localhost:8111/"></script>
<script src="main.js"></script>
<h4>WebSocket Test</h4>
<h3>Status: <span id="status">Waiting</span></h3>
You can’t perform that action at this time.