Skip to content

Instantly share code, notes, and snippets.

View hoanganh25991's full-sized avatar

Anh Le hoanganh25991

  • https://originallyus.sg
  • Vietnam
View GitHub Profile
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@hoanganh25991
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.
<?php
/**
* Greatest Common Factor.
*
* @package GreatestCommonFactor
* @author Gary Jones
* @link http://code.garyjones.co.uk/greatest-common-factor-class/
* @license http://gamajo.mit-license.org/2011
*/
@hoanganh25991
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
/*
* 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
hoanganh25991 / check-emoji.php
Last active March 24, 2022 13:08 — forked from hnq90/CheckEmoji.php
Check Emoji exist in string
<?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
hoanganh25991 / raspberry-test-gpio-lib.md
Last active September 4, 2016 12:12 — forked from jperkin/rpio.md
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
hoanganh25991 / Log.java
Created May 16, 2016 07:06 — forked from solominh/Log.java
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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@hoanganh25991
hoanganh25991 / introrx.md
Created October 29, 2015 14:10 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing