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
@simonharrer
simonharrer / gist:1173228
Created August 26, 2011 11:29
Use JRuby to create a Java Soap Web Service
require 'java'
require 'jruby/core_ext'
module WS
class WebService
def test()
puts "Call received at #{Time.new}"
# x = Result.new
# x.name = "asdf"
# return x
@nszceta
nszceta / pyenv-3.6.3-optimized-installation.sh
Last active November 2, 2020 13:59
pyenv: Python 3.6.3 optimized installation
MAKE_OPTS="-j8" \
CONFIGURE_OPTS="--enable-shared --enable-optimizations --with-computed-gotos" \
CFLAGS="-march=native -O2 -pipe" \
pyenv install -v 3.6.3
@arusahni
arusahni / nocache.py
Last active December 28, 2022 13:12
Flask nocache decorator
from flask import make_response
from functools import wraps, update_wrapper
from datetime import datetime
def nocache(view):
@wraps(view)
def no_cache(*args, **kwargs):
response = make_response(view(*args, **kwargs))
response.headers['Last-Modified'] = datetime.now()
response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0'
@chezou
chezou / re2testbasic.cpp
Created November 26, 2011 12:05
Sample code of re2 basic regexp functions.
#include <iostream>
#include <string>
#include <re2/re2.h>
#include <vector>
using namespace std;
void test_fullmatch(){
string s,t;
string str("あぶらかたぶら");