Skip to content

Instantly share code, notes, and snippets.

Juan Garcia artisanalcode

Block or report user

Report or block artisanalcode

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
artisanalcode / square-canvas.jsx
Last active May 10, 2019
Photoshop script. Crops an image to make it square by resizing the canvas.
View square-canvas.jsx
File: square-canvas.jsx
Version: 1.0
Author: Juan Garcia
Language: JavaScript/ExtendScript
var inputFolder = Folder.selectDialog("Select a folder");
var fileList = inputFolder.getFiles("*.PNG"); // Define type of file to manipulate
artisanalcode / first-unique.js
Created Apr 28, 2016
Return the value of the first unique value on the array. Return -1 if there are no unique values
View first-unique.js
var solution = function (arr) {
"use strict";
// Cache array length
var len = arr.length,
// Default value for no unique value
result = -1;
// Iterate over array
for(var i=0; i < len; i++) {
artisanalcode / conditional-execution.js
Created Apr 28, 2016
Executes code conditionally based on URL.
View conditional-execution.js
* Checks current URL, executes specified content only on non-"blacklisted" URLs.
(function () {
if (!/^\/url-segment-here>|^\/another-url-segment-here|^\/as-many-url-segments-as-needed-here/.test(window.location.pathname)) {
artisanalcode /
Last active Apr 28, 2016
Stand-up meeting report template [SCRUM].


What did I accomplish?

:octocat: PR/CR:

  • Item.

🔬 V&V/Q&A:

  • Item.
You can’t perform that action at this time.