Skip to content

Instantly share code, notes, and snippets.

View zacarkim's full-sized avatar

Valber Lemes Zacarkim zacarkim

View GitHub Profile
@zacarkim
zacarkim / nginxproxy.md
Created March 22, 2018 18:22 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@zacarkim
zacarkim / ws-grade-assign-upload.php
Created March 1, 2018 15:56 — forked from hig3/ws-grade-assign-upload.php
An Exampel of use of Moodle Web Service function mod_assign_save_grades
<?php
// This file is NOT a part of Moodle - http://moodle.org/
//
// This client for Moodle 2 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ref. https://gist.github.com/jleyva/9687810
// http://www.slideshare.net/hig3/moodle-bulkgradeimport in Japanese
@zacarkim
zacarkim / kalmanFilter.py
Created June 2, 2017 03:46 — forked from IshankGulati/kalmanFilter.py
A multi-dimensional implementation of Kalman Filter in Python
# Multi dimensional Kalman filter
from math import *
class matrix:
# implements basic operations of a matrix class
def __init__(self, value):
self.value = value
@zacarkim
zacarkim / AnisotropicDiffusion.cpp
Created June 2, 2017 03:44 — forked from IshankGulati/AnisotropicDiffusion.cpp
Anisotropic (Perona–Malik) Diffusion
/* Anisotropic (Perona–Malik) Diffusion
Author: Ishank Gulati <[email protected]>
Reference
---------
Scale-Space and Edge Detection using Anisotropic Diffusion
Pietro Perona and Jitendra Malik
IEEE Transactions on Pattern Analysis and Machine Intelligence, VOL. 12, NO. 7, JULY 1990
@zacarkim
zacarkim / trilateration.js
Last active August 29, 2015 14:28 — forked from kdzwinel/trilateration.js
Simple trilateration algorithm implementation in JavaScript.
function getTrilateration(position1, position2, position3) {
var xa = position1.x;
var ya = position1.y;
var xb = position2.x;
var yb = position2.y;
var xc = position3.x;
var yc = position3.y;
var ra = position1.distance;
var rb = position2.distance;
var rc = position3.distance;