Skip to content

Instantly share code, notes, and snippets.

View lendamico's full-sized avatar

Len Damico lendamico

View GitHub Profile
@codepo8
codepo8 / redirect
Last active June 29, 2021 16:58
Simple redirect of hotlinked images in .htaccess
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
# allowed domains, add as needed
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?christianheilmann.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wait-till-i.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mozilla.org [NC]
# search engines and social sites and stuff
@TomByrne
TomByrne / MultiExporter.jsx
Last active September 8, 2026 20:14
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
//
@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@davidturnbull
davidturnbull / JekyllBuildPublish
Created August 16, 2013 07:44
Build a Jekyll blog, then publish it.
###############
# VARIABLES #
###############
JEKYLL_PATH='PATH TO JEKYLL GOES HERE' # No trailing slash, please.
DESTINATION_PATH='PATH TO SERVER LOCATION GOES HERE'
SERVER='IP ADDRESS GOES HERE'
USERNAME='USERNAME FOR SERVER GOES HERE'
@ccstone
ccstone / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Last active July 13, 2026 08:32
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19
————————————————————————————————————————————————————————————————————————————————————————————————————
NOTES:
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use.
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete.
@dustinsenos
dustinsenos / gist:5294392
Created April 2, 2013 17:42
Retina Mouse Cursor Files. Below is the file location of the retina mouse cursors on OS X 10.8.3. All files are .pdfs (thanks Apple) so they should work perfectly in Photoshop, Illustrator etc.
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HiServices.framework/Versions/A/Resources/cursors
@0xgdr
0xgdr / content-example.txt
Created January 31, 2013 19:09
How to create custom post types in Statamic.
---
title: Albert Einstein Says
post_type: quote
_template: quote
---
"A person who never made a mistake never tried anything new."
- Albert Einstein
@lendamico
lendamico / Contract Killer 3.md
Last active July 30, 2023 04:27
I've taken Andy Clarke's brilliant Contract Killer and added Text Expander 4 formatting. It's easier to just make a new snippet and use it than it is to explain it, so have fun! I've also added some language regarding kill fees, changed most of the "we's" to "I's" (since I am a sole proprietor) and tweaked a few other things.

Agreement Date: %B %e, %Y

Between me, %filltext:name=Company Name:default=Company Name% and you, %filltext:name=Customer Name:default=Customer Name%

Summary:

I’ll always do my best to fullfil your needs and meet your expectations, but it’s important to have things written down so that I both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. I have no desire to trick you into signing something that you might later regret. What I do want is what’s best for both parties, now and in the future.

So in short;

@PhillyCDO
PhillyCDO / myPhillyRising.md
Last active May 7, 2026 09:11
Proposal for developing a myPhillyRising mobile application for the City of Philadelphia.

##What are we trying to do?

The City of Philadelphia (specifically, the Managing Director’s Office) is looking to engage with a local developer, entrepreneur or software firm to build a mobile application we're calling myPhillyRising.

The purpose of this application is to complement the work being done by the PhillyRising Collaborative in specific neighborhoods in the City of Philadelphia. It is meant to be offered for free use by residents in neighborhoods that are the focus of PhillyRising activities.

##Why are we trying to do this?

PhillyRising, an initiative of the City's Managing Director's office, is built on the idea of collaboration – government collaborating with citizens and community leaders to improve the quality of life in city neighborhoods. PhillyRising targets neighborhoods throughout Philadelphia that are plagued by chronic crime and quality of life concerns, and establishes partnerships with community members to help address these issues.