Skip to content

Instantly share code, notes, and snippets.

View sumio's full-sized avatar

TOYAMA Sumio sumio

View GitHub Profile
@voluntas
voluntas / webrtc.rst
Last active October 10, 2025 07:46
WebRTC コトハジメ
@maki-tetsu
maki-tetsu / mhdir2mbox.rb
Created March 16, 2015 00:23
mhdir2mbox は mew の Maildir 形式で格納されているメールを mbox 形式に変換し thunderbird に移行するためのスクリプトです。Ruby 2.1.x での動作を確認しています。
#! /usr/bin/ruby
# Copyright (C) 2008 F.Narisawa <http://fn23.seesaa.net>
# Distributed under GPL
# Version 0.1.2-1
# Author maki-tetsu <[email protected]>
# * Ruby 2.1.1 ready
require "find"
require "fileutils"
require "stringio"
/*
MIT License
Copyright (c) 2015 Adel Nizamutdinov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
// please check https://github.com/bademux/robolectric-java-gradle-plugin instead
//build.gradle
//fixes AndroidStudion<>Robolectric integration
//fixes 'java.lang.RuntimeException: Stub!' and 'NoClassDefFoundError'
gradle.projectsEvaluated {
def imlFile = file(project.name + '.iml')
def parsedXml;
@avbk
avbk / robo.md
Last active February 20, 2025 09:13
Testing with Robolectric within Android Studio

Testing with Robolectric within Android Studio

Prerequisites

0. Setup a project

Setup a new Android project with Android Studio. If you already have done this you can skip this step.

@Grab(group='org.imgscalr', module='imgscalr-lib', version='4.2') // Grailsの場合はBuildConfig.groovyのdependenciesに 「compile 'org.imgscalr:imgscalr-lib:4.2'」
import java.awt.image.BufferedImage
import javax.imageio.ImageIO
import org.imgscalr.*
def srcFilepath = "/path/to/target.jpg"
def destFormat = 'jpg'
BufferedImage sourceImg = ImageIO.read(new File(srcFilepath))
@P7h
P7h / jdk_download.sh
Last active May 5, 2025 10:36
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@STAR-ZERO
STAR-ZERO / PostprocessBuildPlayer.rb
Last active February 21, 2020 05:44
UnityのiOSビルド時にローカライズファイルを設定する
#!/usr/bin/env ruby
require 'xcodeproj'
require 'fileutils'
PROJECT = 'Unity-iPhone'
TARGET = 'Unity-iPhone'
LIBRARY = 'Libraries'
LOCALIZE = 'Localize'
@kmakita13714
kmakita13714 / init.el
Created April 17, 2013 16:23
私が、Emacs24で利用しているフォントの設定です。 日本語フォントは「Takaoゴシック」を、ASCIIフォントは「Source Code Pro」を利用しています! Source Code Proは、見やすくていいと思います!!
(when (>= emacs-major-version 24)
;; フォントセットを作る
(let* ((fontset-name "myfonts") ; フォントセットの名前
(size 14) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...]
(asciifont "Source Code Pro") ; ASCIIフォント
(jpfont "Takaoゴシック") ; 日本語フォント
(font (format "%s-%d:weight=normal:slant=normal" asciifont size))
(fontspec (font-spec :family asciifont))
(jp-fontspec (font-spec :family jpfont))
(fsn (create-fontset-from-ascii-font font nil fontset-name)))
@grantland
grantland / gist:3949145
Created October 24, 2012 21:50
Fix for "Dx warning: Ignoring InnerClasses attribute for an anonymous inner class"
To fix the following warning, you must add "-keepattributes EnclosingMethod" to your proguard config.
Dx warning: Ignoring InnerClasses attribute for an anonymous inner class
(me.kiip.internal.c.h) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.