Skip to content

Instantly share code, notes, and snippets.

View BYK's full-sized avatar
🔦
Helping engineers help themselves help us all

Burak Yigit Kaya BYK

🔦
Helping engineers help themselves help us all
View GitHub Profile
@BYK
BYK / djb2.js
Last active December 26, 2015 03:49 — forked from anonymous/djb2.sql
Compatible DJB2 Hash implementation in JS and SQL
function djb2Hash(str, seed) {
for (var counter = 0, len = str.length; counter < len; counter++) {
seed ^= (seed << 5);
seed ^= str.charCodeAt(counter);
}
// We discard the sign-bit for compatibility with the DB implementation
// and "always positive integers"
return seed & ~(1 << 31);
}
@BYK
BYK / blogger-to-wordpress.py
Last active August 21, 2016 16:29 — forked from fajran/blogger-to-wordpress.py
A Blogger's backup file to WordPress' WXR converter.Only tested with posts and comments, and NOT with pages. May not be efficient for huge blogs since the script keep all content in the memory during conversion.Released as public domain.
# Blogger's backup file to WordPress' WXR converter.
#
# Only tested with posts and comments, and NOT with pages.
# May not be efficient for huge blogs since the script keep
# all content in the memory during conversion.
#
# Released as public domain.
#
# Please note that I converted the labels in Blogspot
# as tags in WordPress. I also hardcoded two categories for the