Skip to content

Instantly share code, notes, and snippets.

@crazygao
crazygao / 1.py
Created December 12, 2016 14:44
Just a poster for special cases...
import sys
coordinates = [
[(1,5), (6,12), (45,47)],
[(6,8), (14,16), (45,47)],
[(6,8), (14,16), (26,28), (30,32), (35,38), (39,42), (45,47), (50,52), (55,59)],
[(6,8), (14,16), (17,19), (24,26), (30,32), (36,38), (41,43), (45,47), (49,51), (54,56)],
[(6,8), (14,16), (19,21), (23,25), (30,32), (36,38), (41,43), (45,49), (56,59)],
[(6,8), (14,16), (19,21), (24,26), (30,32), (36,38), (41,43), (45,47), (49,51), (58,60)],
[(6,8), (14,16), (19,21), (25,29), (30,33), (35,38), (41,43), (45,47), (50,52), (54,56), (58, 60)]
]
@crazygao
crazygao / Very Hide and Delete.EXCEL.yaml
Last active March 13, 2019 11:09
Performs a basic Excel API call using TypeScript.
name: Very Hide and Delete
description: Performs a basic Excel API call using TypeScript.
host: EXCEL
api_set: {}
script:
content: |
$("#VeryHide").click(() => tryCatch(run));
$("#DelVeryHide").click(() => tryCatch(delIt));
$("#CopyVeryHide").click(() => tryCatch(CopyIt));
$("#UnhideAll").click(() => tryCatch(unhide));
@crazygao
crazygao / Hidden Sheet.EXCEL.yaml
Last active March 13, 2019 09:20
Create a new snippet from a blank template.
name: Hidden Sheet
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
$("#deleteHidden").click(() => tryCatch(deleteHidden));
$("#hide").click(() => tryCatch(hide));
$("#create").click(() => tryCatch(create));
@crazygao
crazygao / Blank snippet (1).EXCEL.yaml
Last active March 13, 2019 09:11
Create a new snippet from a blank template.
name: Blank snippet (1)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {
@crazygao
crazygao / Blank snippet (1).EXCEL.yaml
Last active March 19, 2019 06:14
Reproduce a bug
name: Blank snippet (1)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
Office.initialize = function() {
const testKey = "test-pear-deck";
Office.context.document.settings.refreshAsync(function (asyncResult) {
if (asyncResult.status == Office.AsyncResultStatus.Failed) {
@crazygao
crazygao / Settings.Load.EXCEL.yaml
Last active March 20, 2019 13:50
Load Settings.
name: Settings.Load
description: Load Settings.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {
@crazygao
crazygao / Blank snippet (1).EXCEL.yaml
Last active April 15, 2019 03:03
Save the document on windows. and upload it.
name: Blank snippet (1)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
$("#readOnly").click(() => tryCatch(readOnly));
async function run() {
@crazygao
crazygao / Blank snippet (2).EXCEL.yaml
Created March 28, 2019 11:11
Create a new snippet from a blank template.
name: Blank snippet (2)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
var shapes = {
@crazygao
crazygao / Blank snippet (2).EXCEL.yaml
Created March 28, 2019 12:49
Create a new snippet from a blank template.
name: Blank snippet (2)
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
var shapes = {
initializeByWorksheet: async function(context, worksheetId) {
@crazygao
crazygao / SettingAcrossSync.EXCEL.yaml
Created April 3, 2019 06:11
Create a new snippet from a blank template.
name: SettingAcrossSync
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {