# This is pretty bad code. Don't use it expecting it to work well | |
require 'net/http' | |
require 'uri' | |
require 'nokogiri' | |
# copied and pasted from: | |
# http://ruby-doc.org/stdlib-2.2.3/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Following+Redirection | |
def fetch(uri_str, limit = 2) | |
raise ArgumentError, 'HTTP redirect too deep' if limit == 0 |
#!/usr/bin/env bash | |
title='恋するみたいなキャラメリゼ' | |
curl -s 'http://www.clubdam.com/app/search/searchKeywordKaraoke.html' \ | |
-H 'Content-Type: application/x-www-form-urlencoded' \ | |
--data "keyword=$title&searchType=1&matchOption=0&x=0&y=0" \ | |
--compressed \ | |
| grep -i $title \ | |
| perl -pe 's/<.*?>/ /g' |
source 'https://rubygems.org' | |
gem 'twitter' | |
gem 'dotenv' |
sealed abstract class Idol(val id: String) | |
case class Subunit(name: String, members: Set[Idol]) | |
object Subunit { | |
def apply(name: String, members: Idol*): Subunit = apply(name, members.toSet) | |
} | |
case class IdolUnit(members: Set[Idol], subunits: Seq[Subunit]) |
Available idols: | |
========= | |
11 | |
Juri, Otome, Akari, Sumire, Ichigo, Hinaki, Madoka, Rin | |
(Vampire Mystery, Luminas, Vanilla Chili Pepper, DansingDiva, Jonetsu Jalapeño, Skips♪, Oshare Kaito Swallowtailshin, Aikatsu! Sensei, Tsunagaru Baton, Oto | |
me to Hinaki no Mattari Saka, Gogo wa Ichi Ichi Ichigo Kibun) | |
========= | |
10 | |
Juri, Sakura, Otome, Akari, Sumire, Shion, Ichigo, Hinaki | |
(Vampire Mystery, Powax2PuRiRiN, Luminas, Jonetsu Jalapeño, Oshare Kaito Swallowtailshin, Fushigi no Kuni no Alice, Aikatsu! Sensei, Tsunagaru Baton, Otome |
I hereby claim:
- I am walfie on github.
- I am walfie (https://keybase.io/walfie) on keybase.
- I have a public key whose fingerprint is 5601 632B 2B37 CE71 C060 BEA0 5B97 3FD2 6105 0838
To claim this, I am signing this object:
-
Create a bookmark with the following "URL" (bookmarklet):
javascript:!function(){var a=[].slice.call(document.querySelectorAll('.enemy-info>.name')).map(function(a){return a.innerHTML}).filter(function(a){return a.length>0});jQuery.ajax({dataType:'json',url:'http://gbf-raidfinder.aikats.us/api/bosses.json',data:{name:a},traditional:!0,success:function(a){var b=a.raidBosses.map(function(a){return(a.translatedName||{}).value}).filter(function(a){return a});document.querySelector('#frm-post-tweet').value=b.join(' ')}})}();
-
Go to a raid and open the "Post to Twitter" menu (via "Request Backup" -> "Tweet")
-
Click the bookmarklet
-
If a translation is found, it will be inserted into the input box
Note: Translations might not be found for new event bosses that don't have images yet.
Here's a demo video.
<script> | |
function createWebWorkerFromFunction(f) { | |
var blobContents = ['(', f.toString(), ')();']; | |
var blob = new Blob(blobContents, { type: 'application/javascript'}); | |
var blobUrl = URL.createObjectURL(blob); | |
var worker = new Worker(blobUrl); | |
URL.revokeObjectURL(blobUrl); |
Twitter's default offline archive search is slow as heck. If you do it in a web worker, the search itself is actually pretty fast.
- Download
search.html
andworker.js
to the root directory of your twitter archive (the same directory asindex.html
) - Open
search.html
in browser - Open JS console (probably
ctrl
shift
j
) - Type
search("insert some regex here")
and press enter