Skip to content

Instantly share code, notes, and snippets.

View Plastickid's full-sized avatar

Plastickid

View GitHub Profile
@Plastickid
Plastickid / AI2PDF.jsx
Created October 22, 2020 02:38 — forked from swasher/AI2PDF.jsx
Batch save-as AI to PDF with Black Overprint
/**********************************************************
Export to PDFs.jsx
DESCRIPTION
This sample gets files specified by the user from the
selected folder and batch processes them and saves them
as PDFs.
@Plastickid
Plastickid / 0_Export-Layer-Names.js
Created October 22, 2020 14:15 — forked from KennyRedman/0_Export-Layer-Names.js
Adobe Illustrator script that exports layers as CSV file
#target illustrator
main();
function main(){
if(!documents.length) return;
var doc = app.activeDocument;
var docTitle = doc.name;
var docTitle = docTitle.substring(0, docTitle.length - 3);
@Plastickid
Plastickid / Fit Layer To Canvas.jsx
Created October 23, 2020 15:31 — forked from jawinn/Fit Layer To Canvas.jsx
Fit Layer To Canvas - Photoshop Script
// FIT LAYER TO CANVAS
// via https://forums.adobe.com/message/5413957#5413957
var maintainAspectRatio;// set to true to keep aspect ratio
if(app.documents.length>0){
app.activeDocument.suspendHistory ('Fit Layer to Canvas', 'FitLayerToCanvas('+maintainAspectRatio+')');
}
function FitLayerToCanvas( keepAspect ){// keepAspect:Boolean - optional. Default to false
var doc = app.activeDocument;
var layer = doc.activeLayer;
// do nothing if layer is background or locked
@Plastickid
Plastickid / mailhog-mamp.md
Created November 4, 2020 17:11 — forked from jaredatch/mailhog-mamp.md
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@Plastickid
Plastickid / .htaccess
Created December 10, 2020 22:06 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@Plastickid
Plastickid / menu-array-loop
Created January 21, 2021 18:19 — forked from jonesch/menu-array-loop
Loop through an array of menu items.
//Use CSS to make these columns responsive.
<ul class="food-menus<?=(' '.$menu_category)?>">
<?php
//Let's get a count of how many items we are going to display of our menu
$total_menu_categories = count($menu[$menu_category]);
$total_items = $total_menu_categories;
foreach($menu[$menu_category] as $section => $value) {
$total_items = $total_items + count($value);
} //get the total number of <li>s on our page
$number_of_columns = 3;
C (chained with next rule)
CO=cookie (set specified cookie)
E=var:value (set environment variable var to value)
F (forbidden - sends a 403 header to the user)
G (gone - no longer exists)
H=handler (set handler)
L (last - stop processing rules)
Last rule: instructs the server to stop rewriting after the preceding directive is processed.
N (next - continue processing rules)
@Plastickid
Plastickid / .gitignore
Created October 15, 2021 16:24 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@Plastickid
Plastickid / .gitignore
Created October 15, 2021 16:24 — forked from salcode/.gitignore
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# https://salferrarello.com/starter-gitignore-file/
# ver 20210211
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@Plastickid
Plastickid / Rounded Corners for Outlook.html
Created December 31, 2021 16:18 — forked from marcbacon/Rounded Corners for Outlook.html
VML based button. Rounded corners will work in Outlook.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div>
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://example.com" style="height:36px;v-text-anchor:middle;width:150px;" arcsize="5%" strokecolor="#EB7035" fillcolor="#EB7035">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Helvetica, Arial,sans-serif;font-size:16px;">I am a button &rarr;</center>
</v:roundrect>
<![endif]-->