Skip to content

Instantly share code, notes, and snippets.

View ngocnd0242's full-sized avatar
🎯
Focusing

Ngoc Ngo Dinh ngocnd0242

🎯
Focusing
  • Hà Nội
  • 13:01 (UTC +07:00)
View GitHub Profile
@ngocnd0242
ngocnd0242 / hira_kana_hankana.gs
Last active October 18, 2021 14:46
Full-width Hiragana ⇔ Full-width Katakana ⇔ Half-width Katakana conversion
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);
@ngocnd0242
ngocnd0242 / SwitchPhp.sh
Created April 1, 2019 16:21 — forked from labbots/SwitchPhp.sh
Bash script to switch between available PHP versions in Ubuntu. (Tested in Ubuntu 16.04)
#!/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"