This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the main container for the post | |
var element = $('<div>',{ | |
'class':'post encrypted', | |
'id':'post-'+postId, | |
'data-post-id':postId | |
}); | |
// avatar | |
element.append($('<img src="'+post.user.avatar_image.url+'" class="avatar" />')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am ravisorg on github. | |
* I am ravisorg (https://keybase.io/ravisorg) on keybase. | |
* I have a public key whose fingerprint is 364E 3C99 43F4 8712 EA46 C5DF D3E1 06D5 5849 02CE | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// You can find the test data file at https://www.ravis.org/hashtag-test.zip | |
// You're gonna want to have your console output supporting UTF8 before running this, or you're | |
// gonna see a bunch of ? in the output... | |
// For curiosity's sake, post number 693,847 is an emoji hashtag: #(heart) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Uses the data from unicode.org's emoji-data.txt to build a PHP compatible Regular Expression | |
* along the lines of: | |
* (?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\x{FE0F}?) | |
* | |
* To use: php build-hashtag-regexp.php <emoji-data.txt> | |
* Output will be the generated regular expression. | |
* |