Skip to content

Instantly share code, notes, and snippets.

View shd101wyy's full-sized avatar
🏠
Working from home

Yiyi Wang shd101wyy

🏠
Working from home
  • Mars, Solar system, Universe
View GitHub Profile
@shd101wyy
shd101wyy / subscription.js
Last active October 1, 2016 17:06
subscription test
const x = 12
const y = 14
return {
title: "Hi",
message: "Yoo"
}
@shd101wyy
shd101wyy / service.js
Last active March 1, 2017 02:41
trigger and action model script
{
name: bilibili,
triggers: {
subscribe_user: {
title: "up主最新视频更新",
config: {
id: {
type: "string",
title: "up主数字id",
description: "例如 space.bilibili.com/**122879**",
console.log("Hello JavaScript and World")

TODO:

  • markdown: compile_on_save option. Convert test.src.md to test.md file automatically.
  • Use plantuml-encoder to display images rather than converting svg to png myself.
@shd101wyy
shd101wyy / app.ts
Last active August 16, 2017 22:35
Vue template
import Vue from "vue"
import Component from 'vue-class-component'
@Component({
template: `<div>
This is test {{message}}
<p v-for="l in list">
{{l}}
</p>
</div>`,
0x26ccA438c742Bb5919548c5E2641788d0186f6A8

Export Calendar

  1. Visit: https://calendar.google.com, click the gear then click Settings.

Screen Shot 2017-11-22 at 2.21.43 PM

  1. Choose Calendars section, then click Export calendars to export.

Screen Shot 2017-11-22 at 2.21.15 PM

Calendar Notification

  1. Visit: https://calendar.google.com, click the arrow on the right side of RV Shared Calendar then choose Calendar settings.

Screen Shot 2017-11-24 at 10.27.57 AM

  1. Choose Edit notifications section, then you can enable the nofication that you like, like Daily agenda. Click Save to save the changes.

Screen Shot 2017-11-24 at 10.28.08 AM

@shd101wyy
shd101wyy / decent.sol
Last active April 16, 2018 22:52
My solidity smart contract.
pragma solidity ^0.4.0;
// pragma experimental ABIEncoderV2;
// https://medium.com/daox/three-methods-to-transfer-funds-in-ethereum-by-means-of-solidity-5719944ed6e9
contract Decent {
mapping (bytes32 => mapping(bytes1 => uint256)) state;
mapping (address => bytes32) previousArticleTransactionHashMap;
mapping (bytes32 => bytes32) previousCommentTransactionHashMap;
mapping (bytes32 => bytes32) previousTagTransactionHashMap;
address owner;
pragma solidity ^0.4.0;
// pragma experimental ABIEncoderV2;
// https://medium.com/daox/three-methods-to-transfer-funds-in-ethereum-by-means-of-solidity-5719944ed6e9
contract Gua {
address owner;
address public previousContractAddress;
/**
* 0x0 => earnings
* 0x1 => likes