I hereby claim:
- I am ypresto on github.
- I am ypresto (https://keybase.io/ypresto) on keybase.
- I have a public key ASBiAns4kqBa5eKu8wuHbtMxxMxV675BuMcbDtVlY93JBwo
To claim this, I am signing this object:
{ | |
"workbench.colorTheme": "One Dark Pro", | |
"workbench.colorCustomizations": { | |
"[One Dark Pro]": { | |
// Reduce brightness | |
"activityBar.background": "#1b1d23", | |
"badge.background": "#1b1d23", | |
"editor.background": "#1b1d23", | |
"sideBarSectionHeader.background": "#1b1d23", | |
"tab.activeBackground": "#1b1d23", |
# NOTE: Put this file to spec/support/ . | |
# Prepend specified path to backtrace and Failure/Error section. | |
# Useful for multi module repository where rails is placed in the subdirectory. | |
# Intended for editors with click-to-open-file feature. | |
# | |
# For example | |
# # ./spec/models/your_model_spec.rb:12:in `your_method' | |
# to | |
# # ./rails/spec/models/your_model_spec.rb:12:in `your_method' |
// iOS 11.3 Safari / macOS Safari 11.1 empty <input type="file"> XHR bug workaround. | |
// Replace empty File object with equivalent Blob in FormData, keeping its order, before sending it to server. | |
// Should work with IE10 and all other modern browsers. | |
// Because useragent value can be customized by WebView or etc., applying workaround code for all browsers. | |
// https://stackoverflow.com/questions/49614091/safari-11-1-ajax-xhr-form-submission-fails-when-inputtype-file-is-empty | |
// https://github.com/rails/rails/issues/32440 | |
document.addEventListener('ajax:beforeSend', function(e) { | |
var formData = e.detail[1].data | |
if (!(formData instanceof window.FormData)) return | |
if (!formData.keys) return // unsupported browser |
// iOS 11.3 Safari / macOS Safari 11.1 empty <input type="file"> XHR bug workaround. | |
// This should work with every modern browser which supports ES5 (including IE9). | |
// https://stackoverflow.com/questions/49614091/safari-11-1-ajax-xhr-form-submission-fails-when-inputtype-file-is-empty | |
// https://github.com/rails/rails/issues/32440 | |
document.addEventListener('ajax:before', function(e) { | |
var inputs = e.target.querySelectorAll('input[type="file"]:not([disabled])') | |
inputs.forEach(function(input) { | |
if (input.files.length > 0) return | |
input.setAttribute('data-safari-temp-disabled', 'true') |
I hereby claim:
To claim this, I am signing this object:
local pressedKeyTable = {} | |
-- TODO: Consider about consumed per keys is necessary or not. | |
local consumed = false | |
local keyCodeTable = {} | |
keyCodeTable[0x66] = true -- EISUU | |
keyCodeTable[0x68] = true -- KANA | |
eventtap = hs.eventtap.new({ hs.eventtap.event.types.keyDown, hs.eventtap.event.types.keyUp }, function(event) | |
local keyCode = event:getKeyCode() | |
if keyCodeTable[keyCode] == true then |
import android.net.Uri; | |
import com.google.gson.JsonDeserializationContext; | |
import com.google.gson.JsonDeserializer; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonParseException; | |
import com.google.gson.JsonPrimitive; | |
import com.google.gson.JsonSerializationContext; | |
import com.google.gson.JsonSerializer; |
// | |
// YPLayoutGuideHelper.m | |
// | |
// Created by Yuya Tanaka, 2015 | |
// | |
// This is free and unencumbered software released into the public domain. | |
// Refer: http://unlicense.org/ | |
// | |
// automaticallyAdjustsScrollViewInsets doesn't work for child view controllers | |
// hosted by something like Container View or UIPageViewController. |
package com.example.glide; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.os.Build; | |
import android.os.Environment; | |
import android.os.StatFs; | |
import android.util.Log; | |
import com.bumptech.glide.Glide; |
Namespace('brook.rxjsbridge') | |
.use('brook promise') | |
.define(function(ns) { | |
'use strict'; | |
var observableFromPromise = function(promise, value) { | |
return Rx.Observable.create(function(observer) { | |
var called = false; | |
var throwIfCalled = function() { | |
if (called) { | |
throw new Error('promise resolved twice.'); |