Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Nurettin Onur TUĞCU nurettin

🏠
Working from home
View GitHub Profile
@nszceta
nszceta / pyenv-3.6.3-optimized-installation.sh
Last active Nov 2, 2020
pyenv: Python 3.6.3 optimized installation
View pyenv-3.6.3-optimized-installation.sh
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 Nov 13, 2020
Flask nocache decorator
View nocache.py
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 Nov 26, 2011
Sample code of re2 basic regexp functions.
View re2testbasic.cpp
#include <iostream>
#include <string>
#include <re2/re2.h>
#include <vector>
using namespace std;
void test_fullmatch(){
string s,t;
string str("あぶらかたぶら");
@simonharrer
simonharrer / gist:1173228
Created Aug 26, 2011
Use JRuby to create a Java Soap Web Service
View gist:1173228
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