Skip to content

Instantly share code, notes, and snippets.

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
Accessing Smart Objects in Photoshop
View accessSmartObject.jsx
#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(",");
View 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 Dec 10, 2015
Converts string to SEO-friendly form (lowercase hyphenated alphanumeric words)
View seourl.php
<?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
You can’t perform that action at this time.