View index.gs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parseParams = function (qs) { | |
return qs.split(/&/).reduce((base, cur) => { | |
const kv = cur.split(/=/); | |
base[decodeURIComponent(kv.shift())] = decodeURIComponent(kv.join('=')); | |
return base; | |
}, {}); | |
} | |
function doPost(e) { | |
var prop = PropertiesService.getScriptProperties().getProperties(); |
View gist:9edef603294f6ebc1966779af00fe5b7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Copyright (c) 2018 kyo-ago | |
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 | |
furnished to do so, subject to the following conditions: |
View make.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fs = require('fs'); | |
let karabinerJsonPath = `${process.env.HOME}/.config/karabiner/karabiner.json`; | |
let conditionAppMap = { | |
browsers: [ | |
"^com\\.google\\.Chrome$", | |
"^org\\.mozilla\\.firefox$", | |
"^com\\.apple\\.Safari$", | |
], |
View electron.webpack.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"context": "/Users/kyo/projects/lifter/packages/lifter-app", | |
"devtool": "nosources-source-map", | |
"externals": [ | |
"@lifter/electron-window-manager", | |
"@lifter/lifter-common", | |
"@lifter/lifter-main", | |
"@lifter/networksetup-proxy", | |
"electron-context-menu", | |
"electron-ipc", |
View gist:fd62508cfd4fb264c8bd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name shigotoshiro | |
// @namespace hinatami.net | |
// @description 平日の昼間にamazonを見れなくします。 | |
// @match http://www.amazon.co.jp/* | |
// @grant none | |
// ==/UserScript== | |
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ | |
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge |
View gist:f89ce0ae7518c90caa99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<autogen> | |
__KeyToKey__ | |
KeyCode::P, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L, KeyCode::JIS_EISUU, KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::P, KeyCode::P, KeyCode::L, KeyCode::I, KeyCode::C, KeyCode::A, KeyCode::T, KeyCode::I, KeyCode::O, KeyCode::N, KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::A, KeyCode::C, KeyCode::H, KeyCode::E, KeyCode::SPACE, KeyCode::P, ModifierFlag::SHIFT_L, KeyCode::O, KeyCode::I, KeyCode::S, KeyCode::O, KeyCode::N, KeyCode::I, KeyCode::N, KeyCode::G | |
</autogen> |
View gist:6e9e46791ea61c592831
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SSE = require('sse') | |
, http = require('http'); | |
var server = http.createServer(function(req, res) { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.write('<html><head><title></title></head><body>'); | |
res.write('<script src="https://raw.githubusercontent.com/Yaffle/EventSource/master/eventsource.js"></script><script>'); | |
res.write('var es = new EventSource("/sse");es.onmessage = function (event) {alert(event.data);};'); | |
res.write('</script></body></html>'); | |
res.end(); |
View gist:d26ec4049ac0e5c37d9e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// applicationCacheの更新を妨害する | |
Object.defineProperty(this,'applicationCache',{get:function(){return{}}}); | |
(function () { | |
// AppCache上でlocation.hrefを読み込むとAppCacheの内容を読み込むため、「ブラウザは別URLと認識するが、サーバは同じコンテンツを返すURL」を作る | |
contentLoad(location.href+'/'); | |
// 本来であればsubmit等のイベントもキャッチする必要がある | |
window.addEventListener('click', function (evn) { | |
var elem = evn.target; | |
while (elem.tagName.toLocaleLowerCase() != 'a') elem = elem.parentNode; |
View gist:9873380
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var account = { | |
'email': '', | |
'password': '' | |
}; | |
var bridgeid = ''; | |
var initializeParameter = { | |
'devicetype' : 'GAS', | |
'username' : 'newdeveloper' | |
}; |
View gist:8280903
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 銀行口座 | |
var BankAccount = function (balance) { this.balance = balance; }; | |
BankAccount.prototype.increase = function (money) { this.balance += money; }; | |
BankAccount.prototype.decrease = function (money) { this.balance -= money; }; | |
// ロール: 送信側 | |
var Sender = function () {}; | |
Sender.prototype.send = function (money, to) { | |
this.decrease(money); | |
to.onReceived(money, this); |
NewerOlder