Skip to content

Instantly share code, notes, and snippets.

View muthu32's full-sized avatar

Muthu Kumar muthu32

  • Selvam Softech
  • TamilNadu
View GitHub Profile
@muthu32
muthu32 / cryptojs_base64_encrypt_decrypt.js
Created September 5, 2022 07:40 — forked from joecliff/cryptojs_base64_encrypt_decrypt.js
An example of base64 usage in cryptojs
var CryptoJS = require("crypto-js");//replace thie with script tag in browser env
//encrypt
var rawStr = "hello world!";
var wordArray = CryptoJS.enc.Utf8.parse(rawStr);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
console.log('encrypted:', base64);
//decrypt
var parsedWordArray = CryptoJS.enc.Base64.parse(base64);
@muthu32
muthu32 / jQuery_swap_elements
Last active June 7, 2021 07:25 — forked from derek-dchu/jQuery_swap_elements
Swap two dom elements using jQuery
function swapNodes(a, b) {
var aparent = a.parentNode;
var asibling = a.nextSibling === b ? a : a.nextSibling;
b.parentNode.insertBefore(a, b);
aparent.insertBefore(b, asibling);
}
/** USING JQUERY ***/
function swaptwoID(a,b) {
var nextID = $('#'+a).next().prop('id');
nextID= nextID==b?a:nextID;
https://greasyfork.org/en/scripts/by-site/feedly.com | User scripts for feedly.com
https://www.bing.com/images/search?q=csv&qs=n&form=QBIR&sp=-1&pq=csv&sc=8-3&cvid=8632C9AAFA2F40858B468BF74A3DED54&first=1&scenario=ImageHoverTitle | csv - Bing images
https://www.google.com/search?q=csv&tbm=isch | csv - Google Search
https://www.easyicon.net/iconsearch/csv | Csv icons - 21 free vector icons - Easyicon
https://www.flaticon.com/search?word=csv&search-type=icons&license=selection&order_by=4&grid=small | Search results for Csv - Flaticon
https://icons8.com/icons/set/csv | Csv Icons - Free Download, PNG and SVG
https://www.iconfont.cn/search/index?searchType=icon&q=csv | Iconfont-阿里巴巴矢量图标库
https://www.iconshock.com/csv-icons/ | Csv Icons - Iconshock
https://www.easyicon.net/language.en/iconsearch/iconset:ledicons/?s=addtime_DESC | Ledicons icons - 512 free vector icons - Easyicon
https://www.google.com/search?q=ledicons | ledicons - Google Search
@muthu32
muthu32 / levenshtein.sql
Created February 27, 2018 04:18 — forked from endihunter/levenshtein.sql
MySQL Levenshtein distance algorithm
-- ---------------------------------------------------------------------------
-- Levenshtein distance
-- from the Artful Common Queries page
-- http://www.artfulsoftware.com/infotree/qrytip.php?id=552
-- ---------------------------------------------------------------------------
-- The Levenshtein distance between two strings is the minimum number of
-- operations needed to transform one string into the other, where an operation
-- may be insertion, deletion or substitution of one character.
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
@muthu32
muthu32 / jqm-indexedDB-example.html
Created January 3, 2018 09:23 — forked from greenido/jqm-indexedDB-example.html
indexedDB with jquerymobile - example 1
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Short example on using indexedDB with jquery mobile - last updated: May 2012">
<meta name="author" content="Ido Green">
<title>IndexedDB with JQM</title>
@muthu32
muthu32 / README.md
Created December 22, 2017 08:22 — forked from tmilos/README.md
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation