Skip to content

Instantly share code, notes, and snippets.

View aindong's full-sized avatar
🎯
Focusing

Alleo Indong aindong

🎯
Focusing
View GitHub Profile
@aindong
aindong / GetQueryString.js
Created May 6, 2018 16:36
Get the query string from url using javascript es6
var qs = (function(a) {
if (a == "") return {};
var b = {};
for (var i = 0; i < a.length; ++i)
{
var p=a[i].split('=', 2);
if (p.length == 1)
b[p[0]] = "";
else
b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " "));
@aindong
aindong / AppStoryboard.swift
Created May 1, 2018 14:54 — forked from Gurdeep0602/AppStoryboard.swift
AppStoryboard enumeration
//
// AppStoryboards.swift
// AppStoryboards
//
// Created by Gurdeep on 15/12/16.
// Copyright © 2016 Gurdeep. All rights reserved.
//
import Foundation
import UIKit
@aindong
aindong / APIService.java
Created March 27, 2018 11:56
Sample response
@GET("/v1/categories")
void getMessages(Callback<BaseResponse<CategoriesResponse>> callback);
@aindong
aindong / gist:29910e4e9f5486c40515e14ee1c3a876
Created March 20, 2018 10:19
laravel-folder permission
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
@aindong
aindong / magic_square.py
Created March 3, 2018 15:10
My dirty solution to magic square problem
import argparse
from math import floor
def main():
parser = argparse.ArgumentParser()
parser.add_argument("size", help="The size of the square. Please only input odd numbers")
args = parser.parse_args()
size = int(args.size)
@aindong
aindong / PolylineAnimation.js
Last active January 25, 2018 08:32
Google Map Polyline animation
let gpsPath = []
let step = 0
let stepIncrement = 1
let numSteps = locations.length - 1
let timePerStep = 300
let interval = setInterval(() => {
step += stepIncrement
if (step >= numSteps) {
@aindong
aindong / line-break.css
Created October 12, 2017 08:46
line break on print media css
@media print {
.break {page-break-after: always;}
}
@aindong
aindong / draw_box
Created August 18, 2017 10:17
draw target like graphics on face
cv2.line(Image, (x, y), (x + (w/5) ,y), WHITE, 2)
cv2.line(Image, (x+((w/5)*4), y), (x+w, y), WHITE, 2)
cv2.line(Image, (x, y), (x, y+(h/5)), WHITE, 2)
cv2.line(Image, (x+w, y), (x+w, y+(h/5)), WHITE, 2)
cv2.line(Image, (x, (y+(h/5*4))), (x, y+h), WHITE, 2)
cv2.line(Image, (x, (y+h)), (x + (w/5) ,y+h), WHITE, 2)
cv2.line(Image, (x+((w/5)*4), y+h), (x + w, y + h), WHITE, 2)
cv2.line(Image, (x+w, (y+(h/5*4))), (x+w, y+h), WHITE, 2)
@aindong
aindong / API.md
Created April 18, 2017 10:05 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

#!/usr/bin/env bash
if [ -z $1 ]
then
echo "serve www.domain.com /path"
exit 1
fi
if [ -z $2 ]
then