Skip to content

Instantly share code, notes, and snippets.

View walfie's full-sized avatar

walfie

  • New York City
  • 22:07 (UTC -04:00)
View GitHub Profile
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
@walfie
walfie / idol.scala
Last active February 1, 2016 05:00
Find possible subunits of size <= 8
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])
@walfie
walfie / Gemfile
Last active November 22, 2015 19:27
Get tweets, followers, following
source 'https://rubygems.org'
gem 'twitter'
gem 'dotenv'
@walfie
walfie / passion.sh
Created September 20, 2015 00:01
originally used to find passion flower on clubdam's website
#!/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'
@walfie
walfie / xfce_tumblr_wall.rb
Created August 26, 2015 01:45
Get random tumblr post, set it as wallpaper
# 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
@walfie
walfie / line.md
Last active August 29, 2015 14:21
some nice line stickers