Skip to content

Instantly share code, notes, and snippets.

View harshkn's full-sized avatar

Harsha K N harshkn

View GitHub Profile
@harshkn
harshkn / CircBuffer.c
Created April 8, 2011 09:26
C Implementation of simple circular buffer, Functionality provided are add to queue, read latest
typedef struct circular_buffer
{
void *buffer; // data buffer
void *buffer_end; // end of data buffer
size_t capacity; // maximum number of items in the buffer
size_t count; // number of items in the buffer
size_t sz; // size of each item in the buffer
void *head; // pointer to head
void *tail; // pointer to tail
} circular_buffer;
@harshkn
harshkn / MainTextBoxWithBckSpace
Created May 18, 2011 03:18
Focus MainTextBox on load with backspace functionality
window.onload = function () {
// focus on the input field for easy access...
var input = document.getElementById ('focusme');
input.focus ();
// ...but if someone wishes to go back in their history, let them!
document.onkeydown = function (e) {
if (!e) {
var e = window.event;
}
if (e.keyCode === 8 && !input.value) {
Happy Birthday
'P 'P 'D 'P S 'N - 'P 'P 'D 'P R S - 'P'P P G S 'N 'D - mm G S R S
Happy Birthday (Alternative)
s s r~ s~ m~ g~~~~
Happy birth day to you
s s r~ s~ p~ m~~~~
@harshkn
harshkn / Flute - Ranadeera Hoovu Mullu - Notes
Last active September 10, 2016 15:29
Flute - Ranadeera Hoovu Mullu - Notes
Easy -
S P DP DP GS g R SR SR SR SR S (x2)
GG R
M’ PD
D S n DPM GR S
Difficult -
@harshkn
harshkn / Roja Janeman
Created September 10, 2016 17:07
Flute Notes - Roja Janeman - Karnatic
S G R S N
S g R S N
S S G S G M D PP G(k) R
G G M G R GG MDPM G(k) R
Source : https://www.youtube.com/watch?v=3YjRdMJ24v8
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### Keybase proof
I hereby claim:
* I am harshkn on github.
* I am harshkn (https://keybase.io/harshkn) on keybase.
* I have a public key ASCYRw0hBHl7qIaxWbKEoWrvVwFx3qEFLv9bLraH2Oxodgo
To claim this, I am signing this object:
@harshkn
harshkn / circle_center.py
Created April 5, 2017 07:01
Find circle centre
import cv2 as cv2
import numpy as np
fn = '200px-Traffic_lights_dark_red-yellow.svg.png'
# OpenCV reads image with BGR format
img = cv2.imread(fn)
# Convert to HSV format
img_hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
# lower mask (0-10)
@harshkn
harshkn / BananaBreadRecipe.txt
Created September 24, 2017 16:26
Banana Bread Recipe
Banana Bread
- Recipe - One Loaf
Oven at 180 degree Celsius
- three ripe bananas
- 1 1/2 cups of flour
- 1/2 cups sugar
- 74grams or 2/6 cup melted butter(unsalted)
- 2 eggs
- 1 tsp vanilla extract
@harshkn
harshkn / .txt
Created August 6, 2020 09:52
Naguva Nayana Ukulele Finger picking notes
Naguva Nayana Ukulele
Not complete, will update it when i figure out the rest of it.
--------------------------------------
---1--3--4--3--1--3--1--0--1----------
----------------------------------0--0
--------------------------------------