Skip to content

Instantly share code, notes, and snippets.

/*
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']
},
{
"name": "PROJECT NAME HERE",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"grunt": "~0.4.1",
@simongcc
simongcc / .block
Created April 16, 2017 03:31 — forked from mbostock/.block
The Gist to Clone All Gists
license: gpl-3.0
@simongcc
simongcc / config.rb
Last active April 25, 2017 04:36 — forked from yatil/config.rb
My standard config.rb for compass
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
# You can select your preferred output style
@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
@simongcc
simongcc / 0_reuse_code.js
Created April 27, 2017 17:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console