Skip to content

Instantly share code, notes, and snippets.

:octocat:
Nothing Special

Win Sandy Myint winsandymyint

:octocat:
Nothing Special
  • Myanmar
Block or report user

Report or block winsandymyint

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Preview uploaded image in client side
var reader = new FileReader();
reader.onload = function(evt) {
$scope.$apply(function($scope) {
$scope.preview = evt.target.result;
});
};
reader.readAsDataURL(file);
@winsandymyint
winsandymyint / loveletter.js
Created May 25, 2016
A love letter function written by ECMA 6 arrows
View loveletter.js
let message= function(heartSay){
[73 , 32, 108, 111, 118, 101, 32, 121, 111, 117].forEach(function(value){
heartSay+=String.fromCharCode(value)
});
return heartSay;
}
message('')
//"I love you"
/* Another Ways of calling the above function by using ECMAScript 6 arrows */
@winsandymyint
winsandymyint / index.js
Created Oct 29, 2015 — forked from andjosh/index.js
An example Node.js server that can verify a Shopify webhook's integrity. Run with `node index.js`.
View index.js
const PORT = 3000;
const SECRET = 'APP_SHARED_SECRET';
var http = require('http'),
crypto = require('crypto'),
server;
function verifyShopifyHook(req) {
var digest = crypto.createHmac('SHA256', SECRET)
.update(new Buffer(req.body, 'utf8'))
View mmstrlen.php
<?php
function mmstrlen($str) {
$standalones = array("", "", "", "", "", "", "");
$consonants = array("က", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
$numbers = array("", "", "", "", "", "", "", "", "", "");
$len = mb_strlen($str, "UTF-8");
$count = 0;
for($i = 0; $i < $len; $i++) {
You can’t perform that action at this time.