Skip to content

Instantly share code, notes, and snippets.

Makoto MakotoE

  • Emurasoft
View GitHub Profile
View Uni_CJK_2.jsee
//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
["更","更"],
["車","車"],
["賈","賈"],
["滑","滑"],
View Uni_CJK_3.jsee
// 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 = [
View titleCase.jsee
// Words to exclude
var excludeWords = ['a', 'an', 'and', 'for', 'or', 'as', 'at', 'of'];
/*
Choose between:
eeCaseLowerCase
eeCaseUpperCase
eeCaseCapitalize
*/
var convertTo = eeCaseCapitalize;
View FilesaverTest.EXCEL.yaml
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 Apr 11, 2019
Performs a basic Excel API call using plain JavaScript & Promises.
View FileSaverMinimal.EXCEL.yaml
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 Apr 11, 2019
Performs a basic Excel API call using plain JavaScript & Promises.
View createObjectURLMethod.EXCEL.yaml
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 Aug 3, 2019
How to install indicator-stickynotes on Debian
View installIndicatorStickyNotes.sh
# 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
View replaceExample.jsee
// http://www.emeditor.org/en/macro_selection_selection_replace.html
document.selection.Replace('A(?=[α-ωά-ώ])', 'Α', eeFindReplaceRegExp|eeReplaceAll);
document.selection.Replace('B(?=[α-ωά-ώ])', 'Β', eeFindReplaceRegExp|eeReplaceAll);
View appendBlobTest.go
package main
import (
"bytes"
"context"
"fmt"
"github.com/Azure/azure-storage-blob-go/azblob"
"mime/multipart"
"net/http/httptest"
"net/url"
View dateAnalysis.jsee
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
You can’t perform that action at this time.