Skip to content

Instantly share code, notes, and snippets.


Anh Le hoanganh25991

  • Vietnam
View GitHub Profile
View Has weird right-to-left characters.txt
hoanganh25991 / class.php
Created February 28, 2017 05:27 — forked from GaryJones/class.php
Class for calculating the greatest common factor of two or more numbers.
View class.php
* Greatest Common Factor.
* @package GreatestCommonFactor
* @author Gary Jones
* @link
* @license
hoanganh25991 / bezier.js
Created February 12, 2017 06:21 — forked from mckamey/bezier.js
JavaScript port of Webkit CSS cubic-bezier(p1x.p1y,p2x,p2y) and various approximations
View bezier.js
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
hoanganh25991 / check-emoji.php
Last active March 24, 2022 13:08 — forked from hnq90/CheckEmoji.php
Check Emoji exist in string
View check-emoji.php
* remove emoji from string
public function removeEmoji($text) {
// Match Emoticons
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u';
$clean_text = preg_replace($regexEmoticons, '', $text);
// Match Miscellaneous Symbols and Pictographs
hoanganh25991 /
Last active September 4, 2016 12:12 — forked from jperkin/
Raspberry Pi GPIO Comparison

Comparing node.js GPIO implementations

Here are two simple programs testing the performance of my rpio library against popular alternatives which use the /sys interface (with the number of npm stars indicated for a rough idea of popularity).

rpi-gpio (9 stars)

This test is based on an example on the rpi-gpio page.

As modules which uses /sys depend upon asynchronous behaviour they require callbacks to ensure that the next operation starts only when the previous one has completed.

hoanganh25991 /
Created May 16, 2016 07:06 — forked from solominh/
Android Log Class
* Copyright (C) 2006 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
hoanganh25991 /
Created October 29, 2015 14:10 — forked from staltz/
The introduction to Reactive Programming you've been missing