Skip to content

Instantly share code, notes, and snippets.

@sue445
sue445 / hide_azusaar_logo.user.js
Created March 22, 2012 14:19
Hide AZusaar! Logo
// ==UserScript==
// @name Hide AZusaar! Logo
// @namespace http://azusaar.appspot.com/
// @include http://azusaar.appspot.com/*
// ==/UserScript==
(function(d, func) {
var check = function() {
if (typeof unsafeWindow.jQuery == 'undefined') return false;
func(unsafeWindow.jQuery); return true;
}
@sue445
sue445 / calc_chouseisan.user.js
Created March 31, 2012 09:04
add total count group by mark to chouseisan
// ==UserScript==
// @name chouseisan
// @namespace net.sue445
// @description 調整さんに人数集計を追加します
// @include http://chouseisan.com/schedule/List*
// ==/UserScript==
(function(d, func) {
var check = function() {
if (typeof unsafeWindow.jQuery == 'undefined') return false;
func(unsafeWindow.jQuery); return true;
@sue445
sue445 / AppengineExternalResource.java
Created April 8, 2012 22:48 — forked from mike-neck/AppengineExternalResource.java
@ruleアノテーションを利用したAppengineTestCase
package org.mikeneck.gae.slim3.sample.util;
import org.junit.rules.ExternalResource;
import org.slim3.tester.AppEngineTester;
/**
* @author : mike
* @since : 12/04/08
*/
public class AppEngineExternalResource extends ExternalResource {
@sue445
sue445 / SampleServiceTest.java
Created June 9, 2012 11:24
Datastote#getAsMap sample
package net.sue445.service;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import java.util.Map;
import net.sue445.model.Slim3Model;
import org.junit.Before;
@sue445
sue445 / MapSample.java
Created June 19, 2012 10:58
Map entry sample
import java.util.HashMap;
import java.util.Map;
public class MapSample {
public static void main(String[] args) {
Map<String, Integer> map = new HashMap<String, Integer>();
map.put("a", 1);
map.put("b", 2);
map.put("c", 3);
@sue445
sue445 / Music.java
Created June 22, 2012 15:42
diary/20120623
package net.sue445.jubeatplusplus.enums;
import java.util.HashMap;
import java.util.Map;
import net.sue445.jubeatplusplus.exception.TuneIdNotFoundException;
import org.apache.commons.lang.StringUtils;
@sue445
sue445 / jojo_prime.rb
Created August 11, 2012 07:42
素数のときだけ"JOJO!"って出力するプログラム
require "prime"
1.upto 100 do |num|
p num.prime? ? "JOJO!" : num
end
@sue445
sue445 / multiline_grep.rb
Created August 22, 2012 02:30
空行で区切られた要素に対してgrepする
#!/usr/bin/env ruby
# -*- encoding: utf-8 -*-
=begin
空行で区切られた要素に対してgrepする
=end
if ARGV.length < 2
puts "<usage> ruby multiline_grep.rb [search_file] [search_text1] [search_text2] ..."
exit
@sue445
sue445 / TwitterUtilTest.java
Created September 7, 2012 15:43
Theoriesのサンプル
package net.sue445.azusaar.util;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import javax.servlet.http.Cookie;
import net.sue445.azusaar.util.SessionUtil.SessionKey;
import org.junit.Before;
@sue445
sue445 / DoorkeeperDto.java
Created November 25, 2012 11:35
Doorkeeper API sample for Java
public class DoorkeeperDto{
public DoorkeeperEventDto event = new DoorkeeperEventDto();
}