Skip to content

Instantly share code, notes, and snippets.

View mengu's full-sized avatar

Mengu Kagan mengu

  • Dersaadet
View GitHub Profile
#!/bin/bash
echo "describe cluster;" > /tmp/dc
for i in 1 2 3 4 5; do
echo Attempt $i
if nodetool status | grep "^UN"; then
exit 0
else
sleep 10
fi
done
# enable wireless from the terminal
sudo lshw -C network
sudo ifconfig wlan0 up
# if you get the error : "SIOCSIFFLAGS: Operation not possible due to RF-kill"
sudo rfkill list
# unblock the soft block
@mengu
mengu / sakirt.py
Created June 1, 2011 21:55
Sakirt
from cemaat import Sakirt
from random import randint
sakirt = Sakirt()
sakirt.meslek = "yazilimci" if randint(1,10) % 2 == 0 else "sistemci"
sakirt.save()
# -*- coding: utf-8 -*-
"""
An example to show how to use turbogears sqlalchemy session and model
outside of turbogears.
"""
from fileupload.model import DBSession, metadata, init_model
from fileupload.model.userfile import UserFile
from sqlalchemy import create_engine, sql