Skip to content

Instantly share code, notes, and snippets.

View bangonkali's full-sized avatar
🏠
Working from home

Bangon Kali bangonkali

🏠
Working from home
View GitHub Profile
@bangonkali
bangonkali / wiring.c
Created August 28, 2013 12:01
Blinking pin1 of Cubieboard 2. Uses https://github.com/gootoomoon/WiringCB-python
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <wiringPi.h>
#define OUTPUT 1
#define HIGH 1
#define LOW 0
#define MIN_PIN 50
@bangonkali
bangonkali / gist:7840683
Created December 7, 2013 12:35
Follow these steps to install the Guest Additions on your Ubuntu virtual machine:
Login as ubuntu;
Click on Applications/System/Terminal (or on Applications/Terminal, if you are using the 6.06.1 Dapper Drake release);
Update your APT database with sudo apt-get update, and typing your password, if requested;
Install the latest security updates with sudo apt-get upgrade;
Install required packages with sudo apt-get install build-essential module-assistant;
Configure your system for building kernel modules by running sudo m-a prepare;
Click on Install Guest Additions… from the Devices menu, then choose to browse the content of the CD when requested.
Run sudo sh /media/cdrom/VBoxLinuxAdditions.run, and follow the instructions on screen.
Reference http://virtualboxes.org/doc/installing-guest-additions-on-ubuntu/
int sensorPin = A0;
int timer = 0; // The higher the number, the slower the timing.
int ledPins1[] = {6,7,8,9}; // an array of pin numbers to which LEDs are attached
int ledPins2[] = {10,11,12,13};
int pinCount = 4; // the number of pins (i.e. the length of the array)
int state = 0;
const int buttonPin = 2;
const long doubleClickThreshold = 200;
const long debounceThreshold = 60;
@bangonkali
bangonkali / gist:8699253
Created January 29, 2014 23:10
USB Video Class
│ Symbol: USB_VIDEO_CLASS_INPUT_EVDEV [=n] │
│ Type : boolean │
│ Prompt: UVC input events device support │
│ Location: │
│ -> Device Drivers │
@bangonkali
bangonkali / OpenCV-Sockit-Error
Created February 14, 2014 15:25
OpenCV + SocKit error encountered in prolonged operation. Needs fixing.
Unable to handle kernel NULL pointer dereference at virtual address 0000003c
pgd = 80004000
[0000003c] *pgd=00000000
Internal error: Oops: 17 [#1] SMP ARM
Modules linked in: ipv6 uvcvideo videobuf2_core videodev videobuf2_vmalloc video buf2_memops gpio_dw
CPU: 0 Not tainted (3.8.0-00111-g85cc90f #1)
PC is at usb_hcd_unmap_urb_setup_for_dma+0x8/0xb0
LR is at usb_hcd_unmap_urb_for_dma+0x14/0x134
pc : [<8029b110>] lr : [<8029b1cc>] psr: a0000193
sp : bed8bc88 ip : 00000000 fp : 00000001
@bangonkali
bangonkali / blink.asm
Created April 8, 2014 06:19
PIC16F877A blinking leds example. Only blinks PORTA.
@bangonkali
bangonkali / program.cs
Created December 8, 2014 09:58
Copy Automation Data from One Test Case to Another in MTM Visual Studio 2012
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Server;
using Microsoft.TeamFoundation.TestManagement.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
namespace tfs
@bangonkali
bangonkali / winsex.au3
Created December 19, 2014 07:38
Waits for Windows Security to open and fills up with password and username.
#include <Debug.au3>
WaitForWindowsSecurity()
Func WaitForWindowsSecurity()
Local $Interval = 20
Local $Interval_Loop = 200
_DebugSetup("Waiting for Windows Security")
_DebugOut("Initiating wait script for Windows Security.")
@bangonkali
bangonkali / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
@bangonkali
bangonkali / main.cpp
Created April 13, 2015 10:26
MongoDB C++ Library, OpenCV Integration.
#include <SDKDDKVer.h>
#include <winsock2.h>
#include <Windows.h>
#pragma warning(disable:4819)
#pragma warning(disable:4996)
// for OpenCV2
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"