Skip to content

Instantly share code, notes, and snippets.

View justjkk's full-sized avatar

J Kishore Kumar justjkk

  • Bangalore, India
View GitHub Profile
@justjkk
justjkk / ubuntu.sh
Created May 24, 2011 17:12 — forked from tecoholic/ubuntu.sh
Useful Ubuntu Commands
# Package to install, to get an open terminal in Right-Click context menu.
sudo apt-get install nautilus-open-terminal
# To move window controls in your Ubuntu from left to right…
gconftool-2 --type string --set /apps/metacity/general/button_layout "menu:minimize,maximize,close"
# To switch back
gconftool-2 --type string --set /apps/metacity/general/button_layout "close,maximize,minimize:menu"
# Repeat last command with sudo
sudo !!
@justjkk
justjkk / Stringfns.c
Created June 10, 2010 11:24 — forked from Nachiappan/Stringfns.c
String Functions in C
#include<stdio.h>
#include<stdlib.h>
#define ARRAY_SIZE 15
typedef enum {false, true} bool;
int leng(char *ipstr)
{
int i = 0;
while(ipstr[i] != '\0')
i++;
return i;
@justjkk
justjkk / nqueens.py
Created April 20, 2010 13:57 — forked from yuvipanda/nqueens.py
Recursive solution for N-Queens problem in Python
from math import *
import sys
chosen = {}
n = int(sys.argv[1])
def place(xpos, ypos):
if (ypos in chosen.values()):
return False
opponent = 1