This file contains 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
// Create a new window for the UI | |
var myWindow = new Window("palette", "applyScale"); | |
// Add a checkbox for resizing stroke width | |
var resizeStrokeCheckbox = myWindow.add("checkbox", undefined, "Resize Stroke Width"); | |
var mathRoundText = myWindow.add("checkbox", undefined, "Math Round Text Size"); | |
resizeStrokeCheckbox.value = true; | |
// Add a button to the window | |
var myButton = myWindow.add("button", undefined, "Adjust Scale"); |
This file contains 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 | |
# SETTINGS | |
excludeDisks='mmcblk0..|zram.' | |
defaultDisk=$(lsblk -nro NAME,TYPE | grep -v -E ${excludeDisks} | grep 'part' | head -n 1 | awk '{print $1}') | |
echo " _ " | |
echo " _ __ ___ ___ _ _ _ __ | |_ " | |
echo " | _ _ \ / _ \| | | | _ \| __| " |
This file contains 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
// reg: /\B(?=(\d{3})+(?!\d))/g | |
let number = "1234567890"; | |
let formattedNumber = number.replace(/\B(?=(\d{3})+(?!\d))/g, " "); | |
console.log(formattedNumber); | |
// return 1 234 567 890 | |
// "/": Delimiters used to indicate the beginning and end of the regular expression. |
This file contains 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
#!/usr/bin/env bash | |
# brew install rsync | |
# SETTINGS | |
def_src="$HOME" # default source | |
def_dst="/Path/to/external/drive/folder" # default destination | |
This file contains 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/sh | |
# rsync Apple TimeMachine-like backup script by Q. | |
# thanks to: | |
# http://habrahabr.ru/post/149059/ | |
# http://www.jan-muennich.de/linux-backups-time-machine-rsyn | |
#uncomment to use notification | |
#export DISPLAY=:0 | |
#export XAUTHORITY=/home/qntn/.Xauthority | |
#export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus |