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
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
artisanalcode / focus-blur-debugger.js
Created Aug 17, 2016
Little script to help debug focus/blur events on Chrome.
View focus-blur-debugger.js
/**
* Little script to help debug focus/blur events on Chrome.
* @note Since ChromeDev tools takes focus it creates an Observer Effect @see (https://en.wikipedia.org/wiki/Observer_effect_(physics).
* @author http://stackoverflow.com/users/2122682/aminimalanimal (Found in StackOverflow)
* @see http://stackoverflow.com/questions/8978039/debugging-onfocus-event-using-chrome-developer-tools-cant-return-focus-after-b
*/
$('*').on(
'focus blur',
function(event) {
console.log(event.type + " to:");
@artisanalcode
artisanalcode / stand-up-template-for-slack.md
Last active Jan 21, 2019
Stand-up meeting report template for Slack [SCRUM].
View stand-up-template-for-slack.md

WHAT DID I ACCOMPLISH?

:octocat: Item on PR or CR. 🔬 Item currently on V&V/Q&A. Item done (as per definition of done). 🔹 Other item.

WHAT WILL I DO?

🔛 Currently working on.

View keybase.md

Keybase proof

I hereby claim:

  • I am artisanalcode on github.
  • I am jgarcia (https://keybase.io/jgarcia) on keybase.
  • I have a public key whose fingerprint is F745 B5FF EF65 C466 B3D4 2B64 63B6 7DC8 3F09 8DA1

To claim this, I am signing this object:

@artisanalcode
artisanalcode / stand-up-template-for-slack-simplified.md
Last active Dec 22, 2016
Simple template to post stand-up updates in Slack.
View stand-up-template-for-slack-simplified.md

Version A

🚫 BLOCKERS

  • Blocker short description. [🎫 TICKET]

🔛 WORKING ON

  • Short description. [🎫 TICKET]
@artisanalcode
artisanalcode / usp-calculator.xml
Created Dec 12, 2016
User Story Point (USP) calculator for Excel.
View usp-calculator.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main"><sheetViews><sheetView workbookViewId="0"/></sheetViews><sheetFormatPr customHeight="1" defaultColWidth="14.43" defaultRowHeight="15.75"/><cols><col customWidth="1" min="1" max="1" width="3.0"/><col customWidth="1" min="2" max="2" width="33.43"/><col customWidth="1" min="3" max="3" width="7.0"/><col customWidth="1" min="4" max="4" width="6.14"/><col customWidth="1" min="5" max="5" width="6.0"/><col customWidth="1" m
View csscomb.json
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": false,
"leading-zero": true,
"quotes": "double",
@artisanalcode
artisanalcode / java_properties_delimiter_whitespace_finder.regex
Last active May 12, 2016
RegEx to find whitespace around separator in the a Java properties file
View java_properties_delimiter_whitespace_finder.regex
/**
* Use a lookbehind to make sure we dont accidentaly find ` = ` in the value.
* Prefer the likeliness of missing positive, than getting false positives.
*/
(?<=[a-zA-Z].)+((\s)=(\s)){1}(?=[a-zA-Z])+
@artisanalcode
artisanalcode / zip-validation.js
Last active Apr 28, 2016
A method for jQuery Validation Plugin (http://jqueryvalidation.org/). It checks if a ZIP code entered contains one of a number of prefixes specified in an array. It can also check if a ZIP code is within a certain range or if it contains a specific format (e.g. USA, Canada, etc.). Client work.
View zip-validation.js
/*
Version: 1.0
File: zip-validation.js
Author: Juan Garcia
Email: dev [at] soleilnoirmedia [dot] com
Description: zipValidation.js contains a method for jQuery Validation Plugin (http://jqueryvalidation.org/).
It checks if a ZIP code entered contains one of a number of prefixes specified in an array (A requirement from a client).
It can also check if a ZIP code is within a certain range or if it contains a specific format (e.g. USA, Canada, etc.).
Ideal to validate addresses for local deliveries.
*/
@artisanalcode
artisanalcode / traverse-and-add.js
Created Apr 28, 2016
A function will traverse a tree passed as an argument. The function will add the number values contained on each node when available.
View traverse-and-add.js
// Will traverse a tree passed as an argument. The function will add the number values contained on each node when available.
function traverseAndAdd(tree) {
// Init var to contain sum of values
var sum = 0;
// Function will traverse nodes
var recursiveCrawl = function (branch) {
for (i in branch) {
You can’t perform that action at this time.