Skip to content

Instantly share code, notes, and snippets.

View winsandymyint's full-sized avatar
:octocat:
Nothing Special

Win Sandy Myint winsandymyint

:octocat:
Nothing Special
View GitHub Profile
@winsandymyint
winsandymyint / index.js
Created October 29, 2015 04:04 — forked from joshbeckman/index.js
An example Node.js server that can verify a Shopify webhook's integrity. Run with `node 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'))
<?php
function mmstrlen($str) {
$standalones = array("", "", "", "", "", "", "");
$consonants = array("က", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
$numbers = array("", "", "", "", "", "", "", "", "", "");
$len = mb_strlen($str, "UTF-8");
$count = 0;
for($i = 0; $i < $len; $i++) {