Skip to content

Instantly share code, notes, and snippets.

View MythologicalTaco's full-sized avatar
🏠
Working from home

Retired MythologicalTaco

🏠
Working from home
View GitHub Profile
@florabtw
florabtw / Translate.js
Last active August 6, 2021 22:23
Run with `node Translate.js hello`
// TKK = hours since epoch
var window = {
TKK: parseInt(new Date().getTime() / 1000 / 60 / 60)
};
var t = "a";
var dd = ".";
var Vb = "+-a^+6";
var Tb = "+";
var Ub = "+-3^+b+-f";

The usage is quite simple, just add a new listender to the node you want to observe and manipulate the classes as usually:

var $node = $('div')

  // listen to class-manipulations
  .on('addClass toggleClass removeClass', function (e, oldClass, newClass) {
    console.log('Changed from %s to %s due %s', oldClass, newClass, e.type);
  })
@timw4mail
timw4mail / index.php
Created August 18, 2011 19:39
PHP Kana transliterator
<?php
include("kana.php");
if(isset($_GET['in']) && isset($_GET['action']))
{
$in = $_GET['in'];
if($_GET['action'] == "to_hira")
{
$out = Kana::to_hiragana($in);