Skip to content

Instantly share code, notes, and snippets.

View neuro-sys's full-sized avatar
💭
💾

Fırat Salgür neuro-sys

💭
💾
View GitHub Profile
@neuro-sys
neuro-sys / mandelbrot_zoom.c
Created February 20, 2014 10:20
console mandelbrot zoomer
#include <stdio.h>
#include <complex.h>
#include <math.h>
double tx = -0.1;
double ty = 0.651;
void mandelbrot_draw(const unsigned int width, const unsigned int height)
{
@neuro-sys
neuro-sys / iter_recur.c
Created March 10, 2014 08:10
"Translating a simple iterative loop into a recursive version is about the quickest possible way of filtering out the non-programmers - even a rather inexperienced programmer can usually do it in 15 minutes, and it's a very language-agnostic problem, so the candidate can pick a language of their choice instead of stumbling over idiosyncracies."
#include <stdio.h>
/*
http://programmers.stackexchange.com/questions/182314/recursion-or-while-loops/182334#182334
Translating a simple iterative loop into
a recursive version is about the quickest possible
way of filtering out the non-programmers -
even a rather inexperienced programmer can
usually do it in 15 minutes,
*/
var http = require("http");
var url = require('url');
var fs = require('fs');
var io = require('socket.io');
var server = http.createServer(function(request, response){
console.log('Connection');
var path = url.parse(request.url).pathname;
switch(path){
@neuro-sys
neuro-sys / load.pl
Created June 9, 2014 09:10
my simple irssi config loader
my @parm;
sub init {
my ($data, $server, $witem) = @_;
@parm = split(/ +/, $data);
$server->command("nick $parm[0]");
$server->command("msg nickserv identify $parm[1]");
$server->command("join #archlinux-tr");
@neuro-sys
neuro-sys / JDeveloperOracleTypeToPOJOConverter.java
Last active August 29, 2015 14:04
It converts the Oracle Types that JDeveloper generates for accessing PL/SQL Stored Procedures into POJOs (for the native ones are not Serializable and hard to read). It also generates a POJO to JDeveloper's Oracle Types converter using Apache BinUtils.
package com.allianz.health.provision.ejb.util;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@neuro-sys
neuro-sys / patriciding_thread.java
Created November 9, 2014 11:12
patriciding_thread
new Thread(new Runnable() {
Thread parentThread;
public Runnable init(Thread t) {
parentThread = t;
return this;
}
public void run() {
try {
Thread.sleep(90 * 1000);
@neuro-sys
neuro-sys / public.key
Created November 30, 2014 01:52
public
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFR6d+EBCADSMMLn+etOniOoGyjTriexS67vHV81yETeXy4lXKcBdPFKwvh+
VSt8GlhnbsAw4Tk2ZKj8r/0fhWRjA1m8Ck9gygO/OkW4xPoOAi9sBYoufyLZxGPc
rfP8PrawdSxkHlmzXzQWABLVoMl/c+etSSl3uXl3vgcOXl16lMNuYdoAx/FG6rIH
3BqaMNy9x3H69CajR6Ji1fweyirkuJKLENywIIgqivIHLtH2tgorL2Bc2wtGtTS5
ChQV2mRl8DtJlLS++obMPYXi7fs7w54DI7eJm+43pGuwdo+qPg1H9hNSp+i+ncCE
mv1SKc4UB04p6k4HyDL5RyHzyNvJp+TrnTbjABEBAAG0JEZpcmF0IFNhbGd1ciA8
ZmlyYXRzYWxndXJAZ21haWwuY29tPokBOAQTAQIAIgUCVHp34QIbAwYLCQgHAwIG
@neuro-sys
neuro-sys / hello.m
Last active August 29, 2015 14:10
First Objective-C Program
#import <Foundation/Foundation.h>
@interface MyClass : NSObject
- (void)printHello:(NSString *) name;
@end
@implementation MyClass: NSObject
@neuro-sys
neuro-sys / HltprvBreProvisionTyp.java
Last active August 29, 2015 14:10
Oracle JPublisher generated PL/SQL Procedure Calls/Types.
/*@lineinfo:filename=HltprvBreProvisionTyp*//*@lineinfo:user-code*//*@lineinfo:1^1*/package com.mycompany.health.provision.ejb.dao.bean;
import java.sql.SQLException;
import java.sql.Connection;
import oracle.jdbc.OracleTypes;
import oracle.sql.ORAData;
import oracle.sql.ORADataFactory;
import oracle.sql.Datum;
import oracle.sql.STRUCT;
import oracle.jpub.runtime.MutableStruct;
@neuro-sys
neuro-sys / sdl_gl.c
Created December 7, 2014 01:02
sdl/gl/assimp
#include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <stdio.h>
#include <stdlib.h>