Skip to content

Instantly share code, notes, and snippets.

View copyninja's full-sized avatar

Vasudev Kamath copyninja

View GitHub Profile
# Listen for DHCP and DNS on this interface
interface=wlan0
# No dhcp for this interface
no-dhcp-interface=usb0
# Domain name for a subnet
domain=copyninja.info, 192.168.1.0/24
#dhcp range
@copyninja
copyninja / daemon.c
Created June 19, 2011 07:24
A sample Daemon program in C
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#define RUNNING_DIR "/tmp"
#define LOCK_FILE "daemond.lock"
#define LOG_FILE "daemond.log"
@copyninja
copyninja / getopt.c
Created June 8, 2011 09:33
Trying to reimplement getopt for Fun
/****************************************************************************/
/* Copyright (c) 2011, Vasudev Kamath <[email protected]> */
/* */
/* Permission to use, copy, modify, and/or distribute this software for any */
/* purpose with or without fee is hereby granted, provided that the above */
/* copyright notice and this permission notice appear in all copies. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES */
/* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR */
@copyninja
copyninja / getopt.h
Created June 8, 2011 09:31
Trying to reimplement getopt for Fun
/****************************************************************************/
/* Copyright (c) 2011, Vasudev Kamath <[email protected]> */
/* */
/* Permission to use, copy, modify, and/or distribute this software for any */
/* purpose with or without fee is hereby granted, provided that the above */
/* copyright notice and this permission notice appear in all copies. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES */
/* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR */
@copyninja
copyninja / html-hyphenator.py
Created May 29, 2011 14:01
Python script which hyphenates html files
#!/usr/bin/python
############################################################################################################################
# #
# html-hyphenator.py #
# #
# Copyright 2011 Vasudev Kamath <[email protected]> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@copyninja
copyninja / gem-tgz-debian.sh
Created May 15, 2011 14:54
Script to automate gem fetch && gem2tgz gemname && dh-make-ruby gemname.tar.gz
#!/bin/sh
############################################################################################################################
# #
# #
# gem-tgz-debian #
# #
# Copyright 2011 Vasudev Kamath <[email protected]> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under t
@copyninja
copyninja / kn.dat
Created May 6, 2011 17:25
Kannada language data file for aspell-kn
name kn
charset u-knda
data-encoding utf-8
@copyninja
copyninja / info
Created May 6, 2011 16:42
aspell-kn info file
name_english Kannada
name_native ಕನ್ನಡ
lang kn
data-file u-knda.cset
data-file u-knda.cmap
author:
name Vasudev Kamath
name-native ವಾಸುದೇವ ಕಾಮತ್
email kamathvasudev at gmail dot com
maintainer true
#!/bin/sh
# dbus-start
#if which dbus-launch >/dev/null && test -z "$DBUSSESSIONBUSADDRESS";
#then
# eval "$(dbus-launch --sh-syntax --exit-with-session)"
#fi
#source /etc/X11/xinit/xinitrc.d/30-dbus
#export MEMCPU='memcpu'
@copyninja
copyninja / gist:888132
Created March 26, 2011 08:24
TTS module code for SILPA
#!/usr/bin/python
# -*- coding: utf-8 -*-
##########################################################################################################################
# dhvani.py #
# #
# Copyright 2011 Vasudev Kamath <[email protected]> #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #