Skip to content

Instantly share code, notes, and snippets.

View hkitago's full-sized avatar

hkitago hkitago

  • Kawasaki
View GitHub Profile
@hkitago
hkitago / iMsg.JS
Last active April 6, 2021 03:26
Bookmarklet to create a link with selected text or page title.
javascript:(()=>%7Blet%20d=document,t=window.getSelection?window.getSelection():(d.getSelection?d.getSelection():d.selection.createRange().text),s=((!t%7C%7Ct=='')?d.title:('%22'+t+'%22'))+'%20'+location.href;window.prompt('',s)%7D)()
@hkitago
hkitago / GOOG.JS
Last active April 2, 2021 00:52
Bookmarklet for Google Search.
javascript:(()=>%7Bd=document,w=window,Qr=(w.getSelection?w.getSelection():d.getSelection?d.getSelection():d.selection.createRange().text);if(!Qr%7C%7CQr=='')%7Bvoid(Qr=prompt('Google%20search%20word:',''));%7Dif(Qr)w.open('https://www.google.com/search?q='+encodeURI(Qr))%7D)()
@hkitago
hkitago / EIJIRO.JS
Created August 1, 2018 04:45
Bookmarklet for EIJIRO.
javascript:(function()%7BQr=(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!Qr%7C%7CQr=='')%7Bvoid(Qr=prompt('SPACE%20ALC%20search%20word:',''))%7Dif(Qr)window.open('http://eow.alc.co.jp/'+encodeURI(Qr));%7D)();
@hkitago
hkitago / XSearch.js
Last active May 8, 2024 03:56
Bookmarklet to search on X
javascript:(()=>{w=window,d=document,t=(w.getSelection?w.getSelection():d.getSelection?d.getSelection():d.selection.createRange().text);if(!t||t==''){void(t=prompt('X search word:',''))}if(t){w.open(`https://twitter.com/search?q=${encodeURIComponent(t)}`)}})()
@hkitago
hkitago / iCAL2iEPG.php
Last active March 3, 2019 23:41
for EyeTV 250 users in Japanese
<?php
/* Replace the URL / file path with the .ics url */
$file = "https://www.dropbox.com/s/xi4htg3cpo9eraz/FIFAWC2018_JA-JP.ics?dl=1";
/* Getting events from isc file */
$obj = new ics();
$icsEvents = $obj->getIcsEventsAsArray( $file );
/* Here we are getting the timezone to get the event dates according to gio location */
$timeZone = trim ( $icsEvents [1] ['X-WR-TIMEZONE'] );
unset( $icsEvents [1] );