Skip to content

Instantly share code, notes, and snippets.

View nurettin's full-sized avatar
🏠
Working from home

Nurettin Onur TUĞCU nurettin

🏠
Working from home
View GitHub Profile
@nurettin
nurettin / torquebox.yml
Created November 28, 2012 08:43
issues with queues in torquebox 2.1.2 and jruby-1.7.0
---
# This is the TorqueBox configuration file. Refer to the TorqueBox
# documentation at http://torquebox.org/documentation/current/
# for all configuration options.
ruby:
version: 1.9
web:
context: "/"
@nurettin
nurettin / boost_property_tree_json_array.cpp
Created November 29, 2012 12:26 — forked from mloskot/boost_property_tree_json_array.cpp
Simple example of parsing and consuming JSON array with boost::property_tree
#ifdef _MSC_VER
#include <boost/config/compiler/visualc.hpp>
#endif
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
#include <cassert>
#include <exception>
#include <iostream>
#include <sstream>
@nurettin
nurettin / awesome.rb
Last active December 11, 2015 05:59 — forked from simonharrer/gist:1173228
awesome jax-ws Soap1.2 web service running on jruby 1.7.2
require 'java'
require 'jruby/core_ext'
class MyService
def hello(who)
"Hello #{who}"
end
end
MyService.add_class_annotations(
@nurettin
nurettin / sources.list
Created February 27, 2013 05:12
apt sources.list for linux mint maya 13
deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
deb http://packages.medibuntu.org/ precise free non-free
@nurettin
nurettin / apt.sh
Created February 27, 2013 05:22
ubuntu to linux mint maya 13 keyrings
sudo apt-get install linuxmint-keyring medibuntu-keyring
@nurettin
nurettin / gpg.sh
Created February 27, 2013 05:25
importing ubuntu to linux mint maya 13 gpg keys
gpg --keyserver subkeys.pgp.net --recv-key 2EBC26B60C5A2783
gpg --keyserver subkeys.pgp.net --recv-key 3EE67F3D0FF405B2
@nurettin
nurettin / notclosing.rb
Created March 12, 2013 13:00
opening xls with JRuby and apache poi
require 'java'
require 'lib/java/poi/poi-3.9/poi-3.9-20121203.jar'
java_import 'org.apache.poi.poifs.filesystem.POIFSFileSystem'
java_import 'org.apache.poi.hssf.usermodel.HSSFCell'
java_import 'org.apache.poi.hssf.usermodel.HSSFWorkbook'
java_import 'org.apache.poi.hssf.usermodel.HSSFCellStyle'
java_import 'org.apache.poi.hssf.usermodel.HSSFDataFormat'
java_import 'java.io.FileInputStream'
java_import 'java.util.Date'
@nurettin
nurettin / lolrange.cpp
Created March 27, 2013 12:22
play with boost range and overloading string operator
#include <iostream>
#include <string>
#include <boost/range/counting_range.hpp>
typedef boost::iterator_range<boost::counting_iterator<int> > counting_range_int_t;
counting_range_int_t operator "" _ri(char const* wtf, std::size_t len)
{
static std::istringstream parse;
parse.clear();
@nurettin
nurettin / chokesoncock.cpp
Last active December 15, 2015 11:38
chokes.
#include <iostream>
#include <string>
#include <boost/range/counting_range.hpp>
typedef boost::iterator_range<boost::counting_iterator<int> > counting_range_int_t;
counting_range_int_t operator "" _ri(char const* wtf, std::size_t len)
{
static std::istringstream parse;
parse.clear();
@nurettin
nurettin / gist:5317085
Last active December 15, 2015 20:18
C#? in my C++11 ?
#include <functional>
template <typename T>
struct Property
{
T value;
std::function<T()> getter;
std::function<void(T)> setter;
operator T(){ return getter(); }
void operator= (T wtf){ setter(wtf); }