This file contains hidden or 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
const SWITCHBOT_TOKEN = 'your token'; | |
const SWITCHBOT_SECRET = 'your secret'; | |
const devices = [ | |
{ | |
deviceId: "0123456789AB", | |
deviceName: "Contact Sensor", | |
}, | |
]; |
This file contains hidden or 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
import Store from 'electron-store'; | |
import path from 'path'; // <-- Add | |
import {BrowserWindow, BrowserWindowConstructorOptions, screen} from 'electron'; | |
export default ( | |
windowName: string, | |
options: BrowserWindowConstructorOptions | |
): BrowserWindow => { | |
const key = 'window-state'; | |
const name = `window-state-${windowName}`; |
This file contains hidden or 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
#!/usr/bin/env python | |
from pathlib import Path | |
from pprint import pprint | |
import json | |
import requests | |
class Wrike: | |
ENDPOINT = 'https://www.wrike.com/api/v4' |
This file contains hidden or 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
#!/usr/bin/env python | |
from pathlib import Path | |
from pprint import pprint | |
import json | |
import requests | |
class Wrike: | |
ENDPOINT = 'https://www.wrike.com/api/v4' |
This file contains hidden or 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
# RTX1210 Rev.14.01.16 (Tue Nov 22 19:03:24 2016) | |
# If you want to clear ALL configuration to default, | |
# remove `#' of next line. | |
#clear configuration | |
# | |
# System configuration |
This file contains hidden or 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
val ints = intArrayOf(0x01, 0xFF) | |
val bytes = ints.foldIndexed(ByteArray(ints.size)) { i, a, v -> a.apply { set(i, v.toByte()) } } |
This file contains hidden or 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
// Amazonの注文履歴をTSV形式で出力するスクリプト | |
// | |
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。 | |
// formatEntry関数を書き換えれば自由な書式で出力できます。 | |
// | |
// 参考: | |
// - Amazonの注文履歴をCSV形式にして出力するスクリプト | |
// https://gist.github.com/arcatdmz/8500521 | |
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン) |
This file contains hidden or 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
// Amazonの注文履歴をCSV形式にして出力するスクリプト | |
// | |
// 以下のスクリプトを参考に作成されました。 | |
// http://moroya.hatenablog.jp/entry/2013/06/03/225935 | |
// | |
// CSVに成型しているのは14行目から定義されているformatEntryという関数なので、これを書き換えれば自由な書式で出力できます。 | |
(function(){ | |
// 各注文履歴をCSVフォーマットにして返す | |
var datePattern = new RegExp("(\\d{4})年(\\d{1,2})月(\\d{1,2})日"); |
This file contains hidden or 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
* MPU: STM32L151CCT6 | |
* OSC | |
* High speed clock: 24MHz | |
* Low speed clock: 32.768kHz |