Skip to content

Instantly share code, notes, and snippets.

@echo off
rem identify image details
magick identify -verbose %1
rem convert to progressive
rem call magick convert help list
magick convert
rem convert all jpg/png to interlace in batch file, in command line, replace %%a to %a
/*
How to use icomoon to export icons in your project?
*non-paid version will no save icons in the cloud but only Localstorage of the browser
https://icomoon.io/app
Step
1. Click the stack icon in the top left of the top bar
2. Click `New Project` to create a new project and rename
3. Click load to load the newly created project
4. If there is no icon yet, click `Add Icons From Library…` from existing free/licensed icons OR
@echo off
set file=config.rb
set project=%1
set lang=tc
echo( # Ensure UTF-8 css is correctly parsed by Ruby compiler >> %file%
echo(Encoding.default_external = "utf-8" >> %file%
echo( >> %file%
echo(# Require any additional compass plugins here. >> %file%
@echo off
rem Automatically name with timestamp by drag and drop folder or file into this batch file
rem originally refer to some online tutorials, will add back if I find it
rem get local date time
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
rem set ldt=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2% %ldt:~8,2%:%ldt:~10,2%:%ldt:~12,6%
set ldt=%ldt:~0,4%%ldt:~4,2%%ldt:~6,2%-%ldt:~8,2%%ldt:~10,2%%ldt:~12,2%
set destination=C:\_Public-Share\_Project_Bak
set destination2=Z:\_Project_Bak
@echo off
rem create compass config.rb and necessary folders
set file=config.rb
set project=%1
set lang=tc
if not exist "_source" mkdir _source
if not exist "%project%/js" mkdir js
if not exist "%project%/%lang%/css" mkdir css
if not exist "%project%/%lang%/img" mkdir img
/*
Preparation: require Adobe Extendscript Toolkit
Tested: in CS6, worked
Note: result is shown in console
Original: copied from stackoverflow...ugs..forgotten link
*/
function run(){
var layerSets = app.activeDocument.layerSets;
dumpLayerSets(layerSets);
@echo off
rem this version is for for task scheduler
rem get local date time
for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j
set ldt=%ldt:~0,4%%ldt:~4,2%%ldt:~6,2%-%ldt:~8,2%%ldt:~10,2%%ldt:~12,2%
set destination=C:\location1
set destination2=Z:\location2
set zip_exe="C:\Program Files\7-Zip"
set config_file=C:\config_location
@echo off
rem set this config active
rem powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem list all config in guid
rem powercfg /l
rem latest test on Windows 10
/*
Refer: https://blogs.technet.microsoft.com/win7/2011/01/11/pining-a-bat-cmd-file-to-taskbar/
Please perform the following steps to pin a .BAT/.CMD file to taskbar:
1. Pin a shortcut for cmd.exe to the taskbar.
2. Right click the shortcut on the taskbar and you will see a list that includes “Command Prompt” and “Unpin this program from the taskbar”.
3. Right click the icon for Command Prompt and select properties.
// watching both production and development version of compass project at the same time
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks
// watch both compass dist and dev version
grunt.initConfig({
concurrent: {
target1: ['compass:dist', 'compass:dev']
},