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 / gist:50c2ccd252134e5e88f8aba7eaeb5eca
Created October 25, 2016 18:45
MySQL Config Files MacOSX Sierra
/usr/local/mysql/support-files
@bangonkali
bangonkali / stringreplace.md
Created August 18, 2016 11:04
Powershell script for string replace on Windows.

Replacement to another file.

cat DATA.TXT | % { $_ -replace "Mary","Susan" } > newfile.txt

Same file.

cat DATA.TXT | % { $_ -replace "Mary","Susan" }
@bangonkali
bangonkali / symlink.sh
Created August 9, 2016 15:03
Creating a symlink for visual studio code on mac os x el capitan
#include <Arduino_FreeRTOS.h>
#include <semphr.h> // add the FreeRTOS functions for Semaphores (or Flags).
#include <LiquidCrystal.h>
#include "pitches.h"
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// Declare a mutex Semaphore Handle which we will use to manage the Serial Port.
// It will be used to ensure only only one Task is accessing this resource at any time.
SemaphoreHandle_t xSerialSemaphore;
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Load the data, converters convert the letter to a number
data= np.loadtxt("D:\OpenCV\opencv\sources\samples\data\letter-recognition.data", dtype= 'float32', delimiter = ',',
converters= {0: lambda ch: ord(ch)-ord('A')})
# split the data to two, 10000 each for train and test
train, test = np.vsplit(data,2)
@bangonkali
bangonkali / dev
Last active October 7, 2018 19:39
SIMD
gcc -O2 -std=c99 -msse -lrt -lm test.c -otest
sudo apt-get install linux-headers-$(uname -r) build-essential
/* CSS declarations go here */
body {
font-family: sans-serif;
background-color: #315481;
background-image: linear-gradient(to bottom, #315481, #918e82 100%);
background-attachment: fixed;
position: absolute;
top: 0;
bottom: 0;
@bangonkali
bangonkali / directx.reg
Created November 19, 2015 18:02
Reset Direct X
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectX]
"InstalledVersion"=hex:00,00,00,09,00,00,00,00
"Version"="4.09.00.0904"
@bangonkali
bangonkali / instructions.md
Created October 21, 2015 13:29
Disable Google Chrome Hardware Acceleration in the Mac

Disable Chrome Hardware Acceleration

  1. Right click on the dock and find a way to get to the package
  2. Edit the plist
  3. Save this as a new running file.
#!/usr/bin/env bash
cd cd /Applications/Google\ Chrome.app/Contents/MacOS/
./Google\ Chrome --disable-gpu-vsync --blacklist-accelerated-compositing --blacklist-webgl --disable-accelerated-2d-canvas --disable-accelerated-compositing --disable-accelerated-layers --disable-gpu-sandbox --disable-accelerated-video
@bangonkali
bangonkali / bare_minimum.ino
Created August 22, 2015 16:15
Bare Minimum
void setup() {
// put your setup code here, to run once:</code>
}
void loop() {
// put your main code here, to run repeatedly:
}