Skip to content

Instantly share code, notes, and snippets.

View iconifyit's full-sized avatar
🏠
Working from home

Scott Lewis iconifyit

🏠
Working from home
View GitHub Profile

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 November 26, 2016 01:46
Auto-generate a custom field name using the value of a column and auto-incremented value (Ex: 1.1.001, 1.1.002)
=(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 November 26, 2016 04:30
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.
#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 November 26, 2016 04:39
A simple jQuery plugin example.
/**
* @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 November 26, 2016 16:09
A sample theme for the Iconfinder Portfolio WordPress plugin.
<?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 November 21, 2017 00:52
Adobe Illustrator Document Profiles Preferences
[
{
"appSpecificKey": {
"artboardLayout": 0,
"artboardRowsOrCols": 1,
"artboardSpacing": 20,
"bleedOffset": [
0,
0,
0,
@iconifyit
iconifyit / wpe-cdn-rewrite-rules
Created February 8, 2019 12:54
WPEngine 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 March 11, 2019 03:59
Pad an integer with X number of zeroes
/**
* 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 March 20, 2019 13:32
Black list and white list 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 April 15, 2019 22:44
A custom Google Sheets conditional formatting rule to colorize an entire row based on column/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