Skip to content

Instantly share code, notes, and snippets.

View jfut's full-sized avatar

Jun Futagawa jfut

View GitHub Profile
@jfut
jfut / ag-cygwin.patch
Created December 21, 2013 02:11
The Silver Searcher src/scandir.c patch for Cygwin (tested at commit 1b20368)
$ diff src/scandir.c.default src/scandir.c
42c42
< #ifdef __MINGW32__
---
> #ifdef __CYGWIN__
51c51
< #ifdef __MINGW32__
---
> #ifdef __CYGWIN__
@jfut
jfut / jdk-install
Last active February 18, 2016 13:07
jdk-install MAJOUR_VERSION MINOR_VERSION BUILD ex) 1.7.0_51-b13: jdk-install 7 51 13, ex) 1.8.0-b132: jdk-install 8 0 132
#!/bin/sh
#
# @author Jun Futagawa
INSTALL_SRC_DIR="/usr/local/src/java"
INSTALL_JAVA_DIR="/usr/local/java"
INSTALL_JDK_HOME_DIR="/usr/local/java/jdk"
OS="linux"
OS_EXTENSION="tar.gz"
# x64 or i586
@jfut
jfut / MANIFEST.MF
Created June 29, 2014 03:41
jp.mobster.eclipse.utilities_1.0.2\META-INF\MANIFEST.MF for Eclipse 4.4 [This does not work]
Manifest-Version: 1.0
Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.co
re.resources,org.eclipse.jdt.core,org.eclipse.ui.ide
Export-Package: jp.mobster.eclipse.utilities,jp.mobster.eclipse.utilit
ies.actions,jp.mobster.eclipse.utilities.preferences
Bundle-ManifestVersion: 2
Bundle-Vendor: Project Mobster
Bundle-Name: %pluginName
Bundle-ClassPath: utilities.jar,.
Bundle-SymbolicName: jp.mobster.eclipse.utilities;singleton:=true
@jfut
jfut / pom.xml
Created August 16, 2014 06:22
S2Mai: dependencies at 2014-08-16
...
<!-- S2Mai -->
<dependency>
<groupId>org.seasar.mai</groupId>
<artifactId>s2mai</artifactId>
<version>0.9.6</version>
<exclusions>
<exclusion>
<groupId>ozacc-mail</groupId>
<artifactId>ozacc-mail</artifactId>
@jfut
jfut / ItemControllerTest.java
Created September 1, 2014 16:25
mixer2-fruitshop-springboot: ItemControllerTest.java
package org.mixer2.sample.web.controller;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import java.io.File;
import java.sql.Connection;
import java.util.Locale;
import javax.sql.DataSource;
@jfut
jfut / SpringBeanUtil.java
Last active July 18, 2019 13:07
SpringBeanUtil: Spring で SingletonS2Container.getComponent() 相当を実現
/*
* Copyright 2014 Jun Futagawa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jfut
jfut / AllMixer2HtmlTest1.java
Created September 11, 2014 05:00
AllMixer2HtmlTest1.java
import java.util.List;
import org.junit.Test;
import org.mixer2.Mixer2Engine;
import org.mixer2.jaxb.xhtml.Article;
import org.mixer2.jaxb.xhtml.Body;
import org.mixer2.jaxb.xhtml.H1;
import org.mixer2.jaxb.xhtml.Html;
import org.mixer2.jaxb.xhtml.P;
import org.mixer2.jaxb.xhtml.Section;
@jfut
jfut / jira-show-group-permissions.groovy
Last active August 29, 2015 14:20
JIRA: Show group permissions script
import org.ofbiz.core.entity.EntityUtil
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.permission.ProjectPermissionCategory
def projectManager = ComponentAccessor.getProjectManager()
def permissionManager = ComponentAccessor.getPermissionManager()
def permissionSchemeManager = ComponentAccessor.getPermissionSchemeManager()
def permissionCategories = [
@jfut
jfut / jira-delete-spam-comments.groovy
Created May 6, 2015 07:48
JIRA: Delete spam comments script
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.comments.Comment
import com.atlassian.jira.issue.comments.CommentManager
String issueKey = 'CHURA-XX'
IssueManager issueManager = ComponentAccessor.issueManager
CommentManager commentManager = ComponentAccessor.commentManager
@jfut
jfut / jira-add-group-permissions.groovy
Created May 8, 2015 04:07
JIRA: Add group permissions
import org.ofbiz.core.entity.EntityUtil
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.permission.ProjectPermissionCategory
import com.atlassian.jira.scheme.SchemeEntity
def projectManager = ComponentAccessor.getProjectManager()
def permissionManager = ComponentAccessor.getPermissionManager()
def permissionSchemeManager = ComponentAccessor.getPermissionSchemeManager()