Skip to content

Instantly share code, notes, and snippets.

View xitude's full-sized avatar
💭
This is where I'd put my pro status if I had one.. *dinkleberg*

Zac Grierson xitude

💭
This is where I'd put my pro status if I had one.. *dinkleberg*
View GitHub Profile
@xitude
xitude / accessSmartObject.jsx
Last active May 10, 2017 13:46
Accessing Smart Objects in Photoshop
#target photoshop
if (app.documents.length > 0) {
var existingColor = prompt("Colour to change: color(r,g,b - e.g. 255,255,255 or Hex - e.g. FFFFFF)", "255,255,255");
var newColor = prompt("New colour: color(r,g,b - e.g. 255,255,255 or Hex - e.g. FFFFFF)", "255,255,255");
var newRed = 0, newGreen = 0, newBlue = 0;
if (newColor.indexOf(",") > 0) {
var list = newColor.split(",");
@xitude
xitude / Install composer on Amazon AMI running on EC2
Last active May 10, 2017 13:50 — forked from asugai/Install composer on Amazon AMI running on EC2
Install composer on Amazon AMI running on EC2
cd ~
sudo curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/local/bin/composer
sudo ln -s /usr/local/bin/composer /usr/bin/composer
@xitude
xitude / seourl.php
Created December 10, 2015 13:02
Converts string to SEO-friendly form (lowercase hyphenated alphanumeric words)
<?php
/**
* Converts string to SEO-friendly form (lowercase hyphenated alphanumeric words)
*
* @param $string
* @return string
*/
function seoUrl($string)
{
// qv stackoverflow.com/questions/11330480, stackoverflow.com/questions/1017599