Skip to content

Instantly share code, notes, and snippets.

View Arahnoid's full-sized avatar

Igor Grinchesku Arahnoid

  • Chernivtsi, Ukraine
View GitHub Profile
@Arahnoid
Arahnoid / grid_builder.js
Created November 5, 2015 19:59 — forked from wilkerlucio/grid_builder.js
Photoshop Grid Generator
var DocumentArea = function(doc) {
this.doc = doc;
};
DocumentArea.prototype.bounds = function() {
return [0, 0, this.doc.width, this.doc.height];
};
var DocumentArea = function(doc) {
this.doc = doc;
@Arahnoid
Arahnoid / ps-rotating-sprite.js
Created November 5, 2015 20:04 — forked from phalkunz/ps-rotating-sprite.js
Photoshop script for preparing a sprite for rotating animation
/**
* Photoshop script for preparing a sprite for rotating animation.
* Input : a starting sprite and number of frames
* Output: the specified number of layers ready to be used in the PS animation tool
*/
var docRef = app.activeDocument;
var activeLayer = docRef.activeLayer;
var degToRotate = null;
var newLayer = null;
@Arahnoid
Arahnoid / gist.ahk
Created August 12, 2013 22:37 — forked from maestrith/gist.ahk
testing
access_token:="" ;Your Github access token goes here if you want to publish it to your Gist list
info:="Code to post goes here" ;Change this to create the new text for the Gist
filename:="mygit.txt" ;change this to whatever you want your file name to be
desc:="my description" ;This is where you would have a description for your Gist
post_gist(info,access_token,filename,desc)
return
This file has been truncated, but you can view the full file.
# Add this file to your /etc/hosts to block all
# of the ad sites, porn and general junk on this
# list, including Google.
#
# Fell free to add or subtract sites as necessary.
#
# For linux noobs, to add this to /etc/hosts,
# run the following in the same directory of this
# file:
#
@Arahnoid
Arahnoid / layerNames.js
Last active April 21, 2019 22:47 — forked from vladocar/layerNames.js
[Get list of layer names] #Photoshop
var layerNum = app.activeDocument.layers.length;
var a = [];
for (var i = 0; i < layerNum; i++) {
a[i] = '"' + app.activeDocument.layers[i].name + '"';
}
prompt("Layers Names:", a);
@Arahnoid
Arahnoid / MultiExporter.jsx
Last active April 21, 2019 22:54 — forked from TomByrne/MultiExporter.jsx
[Export from Illustrator]An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files #Illustrator
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@Arahnoid
Arahnoid / psd2png.js
Last active April 21, 2019 22:55 — forked from kikmedia/psd2png.js
[PSD to PNG] Dead simple javascript, providing a basic Photoshop action for exporting PSD files as PNG. Just launch it on your desktop. I think, this one is Windows only. #Photoshop
#target "photoshop"
var outputWidth = 1024;
var inputFolder = Folder.selectDialog("Input folder");
var outputFolder = Folder.selectDialog("Output folder");
if (inputFolder != null && outputFolder != null) {
var files = inputFolder.getFiles("*.psd");
for (var i = 0; i < files.length; i++) {
@Arahnoid
Arahnoid / exportSprites.js
Last active April 21, 2019 22:55 — forked from zaphire/exportSprites.js
[Exports as sprites]Exports photoshop layers as individual sprites, by Tuba #Photoshop
/*Maximum spriteSheet width -> FIXED*/
var maxWidth = 256;
var filename = activeDocument.name.replace(".psd","");
var file = new File(activeDocument.fullName.path+"/"+filename+".xml");
var AD = activeDocument;
var output = new File(activeDocument.fullName.path+"/"+filename+".png");
var pngOptions = new PNGSaveOptions();
@Arahnoid
Arahnoid / gist:6a16c3c813f0bc4c8dca
Last active April 21, 2019 22:56 — forked from keriber/gist:fd8246589145d428fd2f
[Photomerge multiple images ]Photomerge multiple images in Photoshop CC using JavaScrip#Photoshop
//This will be the direcotry of the images
var workFolder = Folder("Z:/Bermudez-Hernandez/Strains Project/Animals/C57_20/Prox1_NeuN/Slide2");
var folders = workFolder.getFiles();
runphotomergeFromScript = true;
//runphotomergeFromScript = true;
$.evalFile( "C:/Program Files/Adobe/Adobe Photoshop CC/Presets/Scripts/Photomerge.jsx")
//photomerge.createPanorama(
//fileList, displayDialog );
psdOpts = new PhotoshopSaveOptions();
@Arahnoid
Arahnoid / gist:3425dbd0211cd2cb4cbc
Last active April 21, 2019 22:57 — forked from JakeRTFM/gist:6165876
[Get PNG from layers]Get PNG from layer in a group by hide/show one by one #Photoshop
main();
function main(){
var doc = activeDocument;
var docPath = activeDocument.path;
var marketApps = doc.layerSets.getByName("Group Name");
for(var a=0; a<marketApps.layers.length; a++){
//alert(marketApps.layers[a]);