Skip to content

Instantly share code, notes, and snippets.

@morganestes
morganestes / example.php
Created April 12, 2012 04:45
Display a random link from a CSV
<?php
include_once 'links.php';
display_link('links.csv');
@morganestes
morganestes / my_zen_settings.js
Created April 25, 2012 14:58
Zen settings for Dreamweaver
var my_zen_settings = {
'html': {
'abbreviations': {
'jq': '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>',
'mod': '<script src="//static.okbar.org/js/modernizr.js"></script>',
'script': '<script>\n\t|\n</script>',
'script:src': '<script src="|"></script>',
},
'snippets': {
'cc:ie8': '<!--[if gte IE 8]>\n\t${child}|\n<![endif]-->',
@morganestes
morganestes / okbar-dev2.css
Created May 4, 2012 22:09
Bad LESS/CSS for recess issue #22
sub {
bottom: -0.5em;
}
.clear {
clear: both;
}
a:active {
color: #608399;
text-decoration: none;
position: relative;
@morganestes
morganestes / index.html
Created October 16, 2012 16:14
Diferencias
<div class="tri drop-shadow">filter: drop-shadow</div>
<div class="tri box-shadow">box-shadow</div>
<div style="clear:both"></div>
<div class="flecha drop-shadow"></div>
<div class="flecha box-shadow"></div>
@morganestes
morganestes / index.html
Created October 16, 2012 16:19
A pure HTML and CSS navigation bar based on something you might see in an iOS application. Forked from odd-e's original. Original - http://codepen.io/odd-e/details/iIHJy
<ul id="nav">
<li></li>
<li></li>
<li class="home mid"><a href="#"></a></li>
<li></li>
<li></li>
</ul>
<div>
@morganestes
morganestes / functions.php
Last active December 11, 2015 21:18
Remove extra stuff from WordPress head.
<?php
/**
* Strip generator and feeds.
* @link http://www.themelab.com/2010/07/11/remove-code-wordpress-header/
*/
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'start_post_rel_link' );
remove_action( 'wp_head', 'index_rel_link' );
@morganestes
morganestes / ft-compress.cs
Created January 29, 2013 02:48
Financial Times compressor ported from JavaScript to C#. Original article at http://labs.ft.com/2012/06/text-re-encoding-for-optimising-storage-capacity-in-the-browser/.
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace ftCompress
{
class Program
{
public static string CompressString(string s)
@morganestes
morganestes / ieh5fix.js
Created March 18, 2013 21:14
Worst IE HTML5 shim I've ever seen. This was actually in a chunk of code delivered to me for production use.
document.createElement("article");
document.createElement("footer");
document.createElement("header");
document.createElement("section");
document.createElement("nav");
document.createElement("address");
document.createElement("abbr");
document.createElement("acronym");
document.createElement("applet");
document.createElement("area");
@morganestes
morganestes / aliases
Last active December 15, 2015 15:58
Use the wistia-uploader gem to loop through a list of files and upload them to a project.
wuploadall() { ~/bin/go-wistia.sh ${PWD##*/}; }
wuploadhere() { ~/bin/go-wistia-sorted.sh; }
@morganestes
morganestes / bookmarklet.js
Created April 26, 2013 17:28
Responsivator Bookmarklet
javascript:var%20page%20=%20document.location.href,responsivator%20=%20%22http://dfcb.github.io/Responsivator/?site=%22;document.location.href%20=%20responsivator+page;