This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set_values(){ | |
var sh = SpreadsheetApp.getActiveSheet(); | |
var lastrow = sh.getLastRow(); | |
var range = sh.getRange("A2:A" + lastrow); | |
var values = range.getValues(); | |
for(var i = 0; i < values.length; i++){ | |
var row = i + 1; | |
var kana_result = hira_kana_hankana(hira, kana, values[i][0]); | |
var hankana_result = hira_kana_hankana(hira, hankana, values[i][0]); | |
sh.getRange("B" + (row + 1)).setValue(kana_result); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if ran with root permissions | |
if [ `id -u` -ne 0 ]; then | |
printf "The script must be run as root! (you can use sudo)\n" | |
exit 1 | |
fi | |
function arrayContains { | |
local e match="$1" |