This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This stops others from using simple links to your media on their site. See comments at end of GIST for limitations | |
# Prevents sites you don't own placing simple embeds on those sites. eg <img src="http://example.com/images/sample-image.png"/> | |
RewriteCond %{REQUEST_URI} ^/images/.* | |
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com(/)?.*$ [NC] | |
RewriteRule .* - [F] | |
# Your bandwidth is precious and others shouldn't poach your bandwidth. | |
# - If someone wants to use media you have on the internet they can get it one way or another | |
# - Does not protect against spoofed headers | |
# - Doesn't stop people from right-click > download image/file (etc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
destfile1.md.sample | |
destfile2.md.sample | |
destfile3.md.sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Server side validation of browser id assertions | |
* | |
* @author @AlchemyCS <https://github.com/alchemycs> | |
* @see GitHub <https://gist.github.com/alchemycs> | |
* @see Mozilla Browser ID <https://browserid.org> | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.spotlight { | |
background:-webkit-gradient(radial, 250 50,0,250 50,800, | |
from(rgba(255,255,255,.4)),to(transparent)) transparent; | |
background: -moz-radial-gradient(250px 50px, | |
rgba(255,255,255,.4), transparent) transparent; | |
} | |
/* | |
Found this nice little snippet on Forrst.com at http://forrst.com/posts/Add_a_spotlight_sheen_to_your_backgrounds_with-zWQ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2010-10-01/"> | |
<ChangeBatch> | |
<Comment> | |
<!-- Change this comment if you like. Don't forget to fill in your own domain and publisher id below! --> | |
Establish DNS records for Google Ads for Domains | |
</Comment> | |
<Changes> | |
<Change> | |
<Action>CREATE</Action> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This class pulls and caches a blog feed from a remote site and displays the content locally. | |
* | |
*/ | |
/** | |
* @author Michael McHugh | |
* @version 1.0 2009-10-14 - Initial code | |
* @version 2.0 2011-06-22 - Updated to allow 0-indexed article offset and standalone display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This code is taken from the forrst post: http://forrst.com/posts/CSS_to_simulate_a_paper_page-zwj | |
*/ | |
section.page { | |
overflow: hidden; | |
margin: 50px auto; | |
width: 600px; | |
padding: 20px; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generates signatures for referred logins to CompliSpace Fundamentals sites. | |
* | |
* Example: CSFReferrer::generate('http://xyz.complispace.com.au', 'bob', | |
* 'sampleAccessKeyId', 'sampleSecretAccessKey', 1320969600); | |
* | |
* @see Development Blog <http://complispace.github.com/> | |
* @see GitHub Repository <https://github.com/CompliSpace> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Basic form layouts using fieldset/legend for form sections. Group elements such as | |
radio and check boxes are implemented with nested fieldsets where the legend of the nested fieldset is the question label and | |
labels inside the ol->li blocks label the input elements. | |
I'll update this gist later with better examples or a reference to examples | |
In the meantime email alchemist {at} alchemycs {dot} net {dot} au for examples. | |
*/ | |
fieldset | |
{ | |
border: 1px solid gray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Make a temporary table for unneeded PKs | |
create temporary table dirty_identifier (pseudo_key integer); | |
-- Get the PKs we don't need | |
insert into dirty_identifier ( | |
select dt1.pseudo_pk from dirty_table as dt1, dirty_table as dt2 where | |
dt1.true_pk_1 = dt2.true_pk_1 | |
-- and dt1.true_pk_2 = dt2.true_pk_3 | |
-- and ... keep repeating for however many attributes make your real key | |
and dt1.pseudo_pk > dt2.pseudo_pk | |
); |