Skip to content

Instantly share code, notes, and snippets.

View simaQ's full-sized avatar
๐ŸŽฏ
Focusing on visualization

Jack Chang simaQ

๐ŸŽฏ
Focusing on visualization
View GitHub Profile
@simaQ
simaQ / README.md
Created August 30, 2018 07:39 — forked from roachhd/README.md
EMOJI cheatsheet ๐Ÿ˜›๐Ÿ˜ณ๐Ÿ˜—๐Ÿ˜“๐Ÿ™‰๐Ÿ˜ธ๐Ÿ™ˆ๐Ÿ™Š๐Ÿ˜ฝ๐Ÿ’€๐Ÿ’ข๐Ÿ’ฅโœจ๐Ÿ’๐Ÿ‘ซ๐Ÿ‘„๐Ÿ‘ƒ๐Ÿ‘€๐Ÿ‘›๐Ÿ‘›๐Ÿ—ผ๐Ÿ”ฎ๐Ÿ”ฎ๐ŸŽ„๐ŸŽ…๐Ÿ‘ป

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โœˆ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: ๐Ÿ˜„

@simaQ
simaQ / README.md
Created November 23, 2017 08:13 — forked from msbarry/README.md
Visvalingam vs. Douglas-Peucker

Two well-known algorithms for polyline simplification are the Douglas Peucker and Visvalingam algorithms.

The Douglas Peucker algorithm uses a recursive divide-and-conquer approach. It starts by drawing a straight line from the first point to the last point. Then it finds the intermediate point that is furthest away from the straight line and deems this the "most important" and splits the polyline into two halves at that point. This process is repeated on both halves until the distance of the intermediate point is below a certain threshold, after which all points on that sub-polyline are thrown away since they have a negligible impact on the overall shape.

The Visvalingam algorithm works from the inside-out. It starts by computing the area of the triangle formed by each consecutive three points along the polyline. Then the midpoint of the triangle with the least area is thrown out since those three points are the closest to colinear and the area of triangles on either side are recomputed. The process

@simaQ
simaQ / gist:0ba91fb5becbaf8937eb
Created May 15, 2015 09:24
solution: Error: EACCES, permission denied '/usr/local/lib/node_modules/...
sudo chown -R `whoami` ~/.npm
sudo chown -R `whoami` /usr/local/lib/node_modules
@simaQ
simaQ / clock
Last active August 29, 2015 14:08
clock implemented by raphaeljs (support ie6+ใ€chromeใ€firefox ...)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Clock</title>
<style>
div#clock_id {
width: 200px;
height: 200px;
@simaQ
simaQ / gist:c6c5065574efdc660c6e
Created July 30, 2014 02:31
vim ๅŽป้™ค่กŒ้ฆ–็ฉบๆ ผ
:%s/^ *//g
@simaQ
simaQ / gist:54eb1bad48fdde4fd666
Created July 21, 2014 07:51
PNG Hack/Fix for IE 6
## for css background-image
.yourselector {
width:200px;
height:100px;
background: url(/folder/yourimage.png) no-repeat;
_background:none;
_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/folder/yourimage.png',sizingMethod='crop');
}
## for inline html images
@simaQ
simaQ / gist:9968529
Last active August 29, 2015 13:58
PHP json_encode ไธญๆ–‡ๆ˜พ็คบ
function unicodeString($str, $encoding=null) {
if (is_null($encoding)) $encoding = ini_get('mbstring.internal_encoding');
return preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/u', create_function('$match', 'return mb_convert_encoding(pack("H*", $match[1]), '.var_export($encoding, true).', "UTF-16BE");'), $str);
}
OR
function unicodeString($str, $encoding=null) {
if (is_null($encoding)) $encoding = ini_get('mbstring.internal_encoding');
return preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/u', function($match) use ($encoding) {