Skip to content

Instantly share code, notes, and snippets.

View kakajika's full-sized avatar
🏠
STAY HOME

Keita Kajiwara kakajika

🏠
STAY HOME
View GitHub Profile
@kakajika
kakajika / nexus6.coffee
Last active August 29, 2015 14:12
Nexus6 release checker for Hubot.
# nexus6.coffee
#
# Description:
# Nexus6 release checker for Hubot.
#
# Commands:
# hubot nexus6 - Nexus6の出荷状態を確認します.
# hubot nexus6 [white|blue] - 色を指定してNexus6の出荷状態を確認します.
cron = require('cron').CronJob
@kakajika
kakajika / AndroidManifest.xml
Last active August 29, 2015 14:12
android:pathPattern that contains more than two dots in AndroidManifest.xml
<data android:pathPattern=".*\\.pdf" />
<data android:pathPattern=".*\\..*\\.pdf" />
<data android:pathPattern=".*\\..*\\..*\\.pdf" />
<data android:pathPattern=".*\\..*\\..*\\..*\\.pdf" />
@kakajika
kakajika / EmStringPattern.java
Last active August 29, 2015 14:12
全角文字を含むString検出のためのJava正規表現
".*[^\x01-\x7E]+.*"
@kakajika
kakajika / ndkbuild.gradle
Last active August 29, 2015 14:12
Android NDK build script for Gradle. GradleでNDKビルドをするスクリプト。
// ndkbuild.gradle
def useJar = true // libをJar化するかどうか
def jniDir = 'src/main/jni'
android {
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDirs = useJar ? [] : [new File(buildDir, 'libs')]
@kakajika
kakajika / designer.html
Created January 4, 2015 03:52
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@kakajika
kakajika / .gitignore
Created January 5, 2015 10:52
Default .gitignore of Android Studio project.
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
@kakajika
kakajika / responder.coffee
Last active August 29, 2015 14:12
JSON responce pattern loader for Hubot.
# responder.coffee
#
# Description:
# Load responce pattern from json file.
#
# Commands:
# hubot responder reload - JSONファイルからResponceパターンを再読み込みします.
# hubot responder list - Responceパターンの一覧を表示します.
fs = require 'fs'
@kakajika
kakajika / linestamp.coffee
Last active August 29, 2015 14:14
SlackにLINEスタンプを検索&投稿するHubotスクリプト
# linestamp.coffee
#
# Description:
# Search & post LINE stamps for Hubot.
#
# Commands:
# hubot stamp
client = require 'cheerio-httpcli'
@kakajika
kakajika / slackstamps.d.ts
Last active August 29, 2015 14:14
SlackにLINE風スタンプを投稿するChrome拡張用スクリプト.
/// <reference path="../ts/typings/jquery/jquery.d.ts" />
/// <reference path="../ts/typings/bootstrap/bootstrap.d.ts" />
declare module SlackStamps {
interface StampProvider {
provideThumbnailURL(): string;
provideImageURLs(): string[];
}
interface StampsMenuManager {
generateMenu(): void;
addStamp(provider: StampProvider): void;
@kakajika
kakajika / PathSimplifier.swift
Last active August 11, 2024 09:25
SwiftによるCGPathの曲線近似の実装(Inspired by paper.js)
// PathSimplifier.swift
import UIKit
private let TOLERANCE: CGFloat = 1e-6
private let EPSILON: CGFloat = 1e-12
extension CGPoint {
func add(p: CGPoint) -> CGPoint {
return CGPointMake(x+p.x, y+p.y)