Skip to content

Instantly share code, notes, and snippets.

@shamenchens
shamenchens / machine.js
Created November 17, 2021 08:47
Generated by XState Viz: https://xstate.js.org/viz
const defaultNotificationPermission = { result: { permission: 1 } };
const defaultCampaign = {
imageUrl: 'https://dummyimage.com/375x346/ffcc00/000',
termsOfService: '<h1>利用規約</h1><h2>■いろはにほへと</h2><p>ちりぬるを</p><ul><li>あ</li><li>い</li></ul>',
campaignStartUnixtime: 1567263600, // 2019-09-01 00:00:00 GMT+9
lotteryEndUnixtime: 1569841200, // 2019-09-30 20:00:00 GMT+9
exchangeEndUnixtime: 1569855600, // 2019-10-01 00:00:00 GMT+9
};
const defaultResults = [
{ result: { remainingTimesToDraw: 2 } },
@shamenchens
shamenchens / machine.js
Last active October 24, 2020 01:38
Generated by XState Viz: https://xstate.js.org/viz
/* eslint-disable prefer-promise-reject-errors */
/* eslint-disable no-undef, no-unused-vars */
const defaultCampaign = {
imageUrl: 'https://dummyimage.com/375x346/ffcc00/000',
termsOfService: '<h1>利用規約</h1><h2>■いろはにほへと</h2><p>ちりぬるを</p><ul><li>あ</li><li>い</li></ul>',
campaignStartUnixtime: 1567263600, // 2019-09-01 00:00:00 GMT+9
lotteryEndUnixtime: 1767092400, // 2025-12-30 20:00:00 GMT+9
exchangeEndUnixtime: 1767106800, // 2025-12-31 00:00:00 GMT+9
};
const defaultResults = [{ result: { remainingTimesToDraw: 1 } }, { result: { code: 'WIN', remainingTimesToDraw: 0 } }];

Notice

This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).
@shamenchens
shamenchens / keybase.md
Created January 29, 2018 02:32
keybase.md

Keybase proof

I hereby claim:

  • I am shamenchens on github.
  • I am shamenchens (https://keybase.io/shamenchens) on keybase.
  • I have a public key ASBhUQYknvI4mMMjdZLGVdXqjjc6Q2NbE_0az15DKXND7Qo

To claim this, I am signing this object: