Skip to content

Instantly share code, notes, and snippets.

Avatar

Anh Le Hoang hoanganh25991

View GitHub Profile
View config.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>DSDT</key>
<dict>
<key>Fixes</key>
<dict>
View debug-c.md

Debug C

  • Install VS Code
  • Enable C/C++ extensions
  • Copy launch.json, task.json to .vscode directory
  • Run debug for giftcardreader.c

Install VS Code

Please download and install VS Code from https://code.visualstudio.com/download

View keybase.md

Keybase proof

I hereby claim:

  • I am hoanganh25991 on github.
  • I am hoanganh25991 (https://keybase.io/hoanganh25991) on keybase.
  • I have a public key whose fingerprint is 9EB9 4C6B 5FED 6B59 761E 6F7D 18DD 86E9 1CB4 F93F

To claim this, I am signing this object:

View blockstack
Verifying my Blockstack ID is secured with the address 19WqJAAFxkPSCb4nLKoScfe1CGkZZjaTyu https://explorer.blockstack.org/address/19WqJAAFxkPSCb4nLKoScfe1CGkZZjaTyu
View keybase.md

Keybase proof

I hereby claim:

  • I am hoanganh25991 on github.
  • I am hoanganh25991 (https://keybase.io/hoanganh25991) on keybase.
  • I have a public key ASDithdCc_slRfcTJP3qKG4fNmsk_H52D8jl73jwnn7zOQo

To claim this, I am signing this object:

View Has weird right-to-left characters.txt
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@hoanganh25991
hoanganh25991 / class.php
Created Feb 28, 2017 — forked from GaryJones/class.php
Class for calculating the greatest common factor of two or more numbers.
View class.php
<?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 Feb 12, 2017 — 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
hoanganh25991 / check-emoji.php
Last active Nov 25, 2016 — forked from hnq90/CheckEmoji.php
Check Emoji exist in string
View check-emoji.php
<?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 Sep 4, 2016 — forked from jperkin/rpio.md
Raspberry Pi GPIO Comparison
View raspberry-test-gpio-lib.md

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.