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
{
"Ansi 7 Color" : {
"Green Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527
},
"Tags" : [
],
"Ansi 12 Color" : {
@bangonkali
bangonkali / notes.txt
Created February 22, 2018 12:06
App_GlobalResources Dilemma
Thanks for help
I did:
Create folder Resources
Move all resources from App_GlobalResources to new folder
Change all file properties:
Build Action: Embedded Resource
Copy to output: Copy always
@bangonkali
bangonkali / readme.md
Created February 5, 2018 01:58
Brew Install Mac OS X High Sierra
sudo chown -R $(whoami):admin /usr/local && sudo chmod -R g+rwx /usr/local
@bangonkali
bangonkali / readme.md
Last active January 22, 2018 13:53
Creating Non-conventional Routes for Strava
@bangonkali
bangonkali / main.md
Last active December 17, 2017 17:03
Azure functions

Notes on Azure functions

Installing the CLI

npm i -g azure-functions-core-tools@core

Creating the Template

@bangonkali
bangonkali / dispatchqueue.swift
Created February 18, 2017 21:00
Simple Dispatch Queue
DispatchQueue.global(qos: .background).async {
var x:Int = 0
while (x < Int.max){
x+=1
var y:Int = 0
while (y < Int.max){
y+=1
if (y % 10000 == 0){
DispatchQueue.main.async {
self.numbers.text = "value x:\(x) y:\(y)}"
@bangonkali
bangonkali / gis.sql
Last active December 21, 2016 11:14
Some notes on PostGis
-- Creates the table
CREATE TABLE geom_points (
id_pk INTEGER PRIMARY KEY
);
-- Adds the columns
SELECT AddGeometryColumn('geom_points','coordinates','4326','POINT',2); -- (long, lat)
-- Inserts the Latitude and Longitude from Geography to Geometry. (long, lat)
INSERT INTO geom_points(id_pk, coordinates)
@bangonkali
bangonkali / GeoCoordinate.cs
Last active December 2, 2016 21:22
Gets the distance between two latitude and longitude points.
// http://www.geodatasource.com/developers/c-sharp
using System;
namespace <your_namespace>
{
public class GeoCoordinate
{
public double Latitude { get; set; }
@bangonkali
bangonkali / notes.cs
Created October 29, 2016 18:27
Classic Eager loading for entity framework.
// GET api/values
[HttpGet, Route("branches")]
public IActionResult Branches()
{
//_context.Regions.Where(u=>u.Business.BusinessId == )
var regions = _context.Regions
.Include(x => x.Branches)
.Include(x => x.Business)
.ToList();
@bangonkali
bangonkali / gist:50c2ccd252134e5e88f8aba7eaeb5eca
Created October 25, 2016 18:45
MySQL Config Files MacOSX Sierra
/usr/local/mysql/support-files