Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Scott Lewis iconifyit

🏠
Working from home
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am iconifyit on github.
  • I am iconify (https://keybase.io/iconify) on keybase.
  • I have a public key whose fingerprint is 847A 07C3 3800 2AF9 FEC7 3895 7B41 79F6 F0B4 7F26

To claim this, I am signing this object:

@iconifyit
iconifyit / google-sheets-autoname
Last active Nov 26, 2016
Auto-generate a custom field name using the value of a column and auto-incremented value (Ex: 1.1.001, 1.1.002)
View google-sheets-autoname
=(CONCAT(
INDIRECT("E" & ROW()) ,
CONCAT(
IF (COUNTIF(
INDIRECT("E2:E" & (ROW())),
INDIRECT("E" & ROW())
) > 99, ".0",
IF (COUNTIF(
INDIRECT("E2:E" & (ROW())),
INDIRECT("E" & ROW())
@iconifyit
iconifyit / Ai-Sessions.js
Last active Nov 26, 2016
A JavaScript Extension plugin for Adobe Illustrator to save the names and locations of all open documents to quickly open them at a later time.
View Ai-Sessions.js
#target illustrator
/**
* USAGE:
*
* 1. Place this script in Applications > Adobe Illustrator > Presets > en_US > Scripts
* 2. Restart Adobe Illustrator to activate the script
* 3. The script will be available under menu File > Scripts > Ai_Sessions
* 4. Follow the on-screen prompts
*/
/**
@iconifyit
iconifyit / jquery.explainify.js
Created Nov 26, 2016
A simple jQuery plugin example.
View jquery.explainify.js
/**
* @author Scott Lewis
* @date June 4, 2011
* @link http://technify.me
*
* Just follow the comments in the code to understand what's going on.
*/
/**
* Create an anonymous function to avoid library conflicts
*/
@iconifyit
iconifyit / iconset-advanced.php
Created Nov 26, 2016
A sample theme for the Iconfinder Portfolio WordPress plugin.
View iconset-advanced.php
<?php
/**
* Provide a public-facing view for the plugin
*
* This file is used to markup the public-facing aspects of the plugin.
*
* @link http://iconify.it
* @since 1.0.0
*
* @package Iconfinder_Portfolio
@iconifyit
iconifyit / PresetDocumentProfileData.json
Created Nov 21, 2017
Adobe Illustrator Document Profiles Preferences
View PresetDocumentProfileData.json
[
{
"appSpecificKey": {
"artboardLayout": 0,
"artboardRowsOrCols": 1,
"artboardSpacing": 20,
"bleedOffset": [
0,
0,
0,
@iconifyit
iconifyit / wpe-cdn-rewrite-rules
Created Feb 8, 2019
WPEngine CDN Rewrite Rules
View wpe-cdn-rewrite-rules
#http://diversityavatars.com# => https://cdn.diversityavatars.com
#src="https://diversityavatars.com/wp-content/(.*)"# => src="https://cdn.diversityavatars.com/wp-content/$1"
#src='https://diversityavatars.com/wp-content/(.*)'# => src='https://cdn.diversityavatars.com/wp-content/$1'
#src="https://diversityavatars.com/wp-includes/(.*)"# => src="https://cdn.diversityavatars.com/wp-includes/$1"
#src='https://diversityavatars.com/wp-includes/(.*)'# => src='https://cdn.diversityavatars.com/wp-includes/$1'
#href="https://diversityavatars.com/wp-content/(.*)\.css"# => href="https://cdn.diversityavatars.com/wp-content/$1.css"
#href='https://diversityavatars.com/wp-content/(.*)\.css'# => href='https://cdn.diversityavatars.com/wp-content/$1.css'
@iconifyit
iconifyit / add-leading-zeroes.js
Last active Mar 11, 2019
Pad an integer with X number of zeroes
View add-leading-zeroes.js
/**
* Add leading zeroes to an integer.
* @param {int} num The number to which to add leading zeros.
* @param {ing} zeros The length of the resulting string.
* @returns {str}
*/
function addLeadingZeros(num, width) {
return String(Math.pow(10, width) + num).slice(-width) ;
}
@iconifyit
iconifyit / restrict-wordpress-login
Created Mar 20, 2019
Black list and white list WordPress login
View restrict-wordpress-login
# Add the following block to your WordPress .htaccess just above the section labeled 'BEGIN WordPress'
<IfModule mod_rewrite.c>
# Restrict login to my IP
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
# Your IP address goes below. Escape the dots with a backslash.
# Whitelist multiple IP addresses by copying and pasting the line below and
# changing the IP address to the one you want to whitelist.
@iconifyit
iconifyit / Google Sheet Colorize Row by Cell Value
Last active Apr 15, 2019
A custom Google Sheets conditional formatting rule to colorize an entire row based on column/cell value
View Google Sheet Colorize Row by Cell Value
# Select the rows to which you want the rule to apply
# Go to Format > Conditional Formatting
# Add a new formatting rule to the tool bar in the right-hand column
# Select 'Custom Formula' from the drop down
# Enter the formula below and modify the column name as needed
=(AND(NOT(INDIRECT("C" & ROW()) = ""), INDIRECT("C" & ROW()) = 0))
# Select the formatting styles youw ant to apply
You can’t perform that action at this time.