Skip to content

Instantly share code, notes, and snippets.

//All characters except for '礼(FA18), 恵(FA6B), 𤋮(FA6C), 舘(FA6D), 𢡊(FBCF), 𢡄(FBD0), 𣏕(FBD1), 𥉉(FBD5), 𥳐(FBD6), 𧻓(FBD7)' are changed into CJK unified characters
//礼(FA18), 恵(FA6B), 𤋮(FA6C), 舘(FA6D) are changed popular normal characters. 𢡊(FBCF), 𢡄(FBD0), 𣏕(FBD1), 𥉉(FBD5), 𥳐(FBD6), 𧻓(FBD7) are omitted, because they correspond to SMP characters.
// List of [original character, converted character] pairs
var characterConversions = [
["\uf900","\u8c48"], // Unicode characters can be written like this
["更","更"],
["車","車"],
["賈","賈"],
["滑","滑"],
// Applies CJK conversion to specified documents.
//All characters except for '礼(FA18), 恵(FA6B), 𤋮(FA6C), 舘(FA6D), 𢡊(FBCF), 𢡄(FBD0), 𣏕(FBD1), 𥉉(FBD5), 𥳐(FBD6), 𧻓(FBD7)' are changed into CJK unified characters
//礼(FA18), 恵(FA6B), 𤋮(FA6C), 舘(FA6D) are changed popular normal characters. 𢡊(FBCF), 𢡄(FBD0), 𣏕(FBD1), 𥉉(FBD5), 𥳐(FBD6), 𧻓(FBD7) are omitted, because they correspond to SMP characters.
// Document path
var folderPath = "C:\\Users\\makot\\Downloads\\"; // Use double backslash to use backslash character in string
// List of documents to process
var docs = [
// Words to exclude
var excludeWords = ['a', 'an', 'and', 'for', 'or', 'as', 'at', 'of'];
/*
Choose between:
eeCaseLowerCase
eeCaseUpperCase
eeCaseCapitalize
*/
var convertTo = eeCaseCapitalize;
@MakotoE
MakotoE / FilesaverTest.EXCEL.yaml
Last active April 9, 2019 23:33
FilesaverTest
name: Basic API call (JavaScript)
description: Performs a basic Excel API call using plain JavaScript & Promises.
host: EXCEL
api_set: {}
script:
content: |
saveAs(new Blob(["test"], { type: "text/csv" }), "name.csv");
language: typescript
template:
content: ''
@MakotoE
MakotoE / FileSaverMinimal.EXCEL.yaml
Last active April 11, 2019 00:40
Performs a basic Excel API call using plain JavaScript & Promises.
name: FileSaver minimal test
description: Performs a basic Excel API call using plain JavaScript & Promises.
host: EXCEL
api_set: {}
script:
content: |-
const blob = new Blob(["test"], { type: "application/octet-stream" });
const reader = new FileReader();
reader.onloadend = function () {
const url = reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');
@MakotoE
MakotoE / createObjectURLMethod.EXCEL.yaml
Last active April 11, 2019 00:51
Performs a basic Excel API call using plain JavaScript & Promises.
name: createObjectURL method
description: Performs a basic Excel API call using plain JavaScript & Promises.
host: EXCEL
api_set: {}
script:
content: |-
const link = document.getElementById('link');
const blob = new Blob(["test"], { type: "application/octet-stream" });
link.href = URL.createObjectURL(blob);
link.download = "name.txt";
@MakotoE
MakotoE / installIndicatorStickyNotes.sh
Last active December 28, 2023 01:43
How to install indicator-stickynotes on Debian
# Get public key ("fingerprint") from https://launchpad.net/~umang/+archive/ubuntu/indicator-stickynotes
$key='<PUBLIC KEY>'
sudo add-apt-repository "deb http://ppa.launchpad.net/umang/indicator-stickynotes/ubuntu eoan main"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
sudo apt update
sudo apt install indicator-stickynotes
// http://www.emeditor.org/en/macro_selection_selection_replace.html
document.selection.Replace('A(?=[α-ωά-ώ])', 'Α', eeFindReplaceRegExp|eeReplaceAll);
document.selection.Replace('B(?=[α-ωά-ώ])', 'Β', eeFindReplaceRegExp|eeReplaceAll);
package main
import (
"bytes"
"context"
"fmt"
"github.com/Azure/azure-storage-blob-go/azblob"
"mime/multipart"
"net/http/httptest"
"net/url"
document.ConvertCsv(2); // This assumes your Tab format is the second one on the CSV/Sort bar
function parseDate(s) {
var split = s.split('/');
return new Date(split[2], split[1] - 1, split[0]);
}
var data = [];
// Read the file