Skip to content

Instantly share code, notes, and snippets.

View germanny's full-sized avatar

Jen G germanny

View GitHub Profile
// important: note the priority of 99, the js needs to be placed after tinymce loads
// important: note that this assumes you're using http://wordpress.org/extend/plugins/verve-meta-boxes/
// to create the textarea - otherwise change your selector
function admin_add_wysiwyg_custom_field_textarea()
{ ?>
<script type="text/javascript">/* <![CDATA[ */
jQuery(function($){
var i=1;
$('.verve_meta_box_content textarea').each(function(e)
@germanny
germanny / 0_reuse_code.js
Created August 6, 2014 18:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@germanny
germanny / content-kitchen-sink.html
Created March 13, 2012 20:25 — forked from ericrasch/content-kitchen-sink.html
HTML Kitchen Sink (taken from BlueTrip CSS Framework) includes the major (and minor) HTML tags you might use on any given site.
<h1>Level 1 heading</h1>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h1 class="fancy">Level 1 heading class="fancy"</h1>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h1 class="thin">Level 1 heading class="thin"</h1>
@germanny
germanny / dabblet.css
Created March 15, 2012 18:48 — forked from ericrasch/dabblet.css
Horizontal Type Line Behind Text
/**
* Horizontal Type Line Behind Text
* Inspired by this discussion @ CSS-Tricks: http://css-tricks.com/forums/discussion/comment/51357#Comment_51357
* Available on jsFiddle: http://jsfiddle.net/ericrasch/jAXXA/
* Available on Dabblet: http://dabblet.com/gist/2045198
* Available on GitHub Gist: https://gist.github.com/2045198
*/
h2 {
@germanny
germanny / dabblet.css
Created March 21, 2012 23:34 — forked from chriscoyier/dabblet.css
Untitled
.holder {
position: relative;
width: 215px;
height: 215px;
margin: 20px;
z-index: 999;
cursor: pointer;
}
.h1 {
@germanny
germanny / fb-comments.html
Created May 24, 2012 01:47 — forked from jimmynotjim/fb-comments.html
Adaptive sizing for FB comments plugin
<!-- New HTML5 FB Comments -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
@germanny
germanny / Preferences.sublime-settings
Created December 26, 2015 20:41 — forked from jimmynotjim/Preferences.sublime-settings
Current ST2 User Settings
{
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/User/SublimeLinter/Phix Dark (SL).tmTheme",
"detect_indentation": true,
"file_exclude_patterns":
[
".DS_Store",
"dump.rdb"
],

RegEx Snippets


Extract URLs

Find all links

Works pretty well in capturing the full URL when using this in a search (like in Sublime Text 2). (https?|ftps?)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/?

Find all links within a specific subfolder structure and replace with alt subfolders

The following will capture the URL in a SQL dump including escaped quotation marks.

<?php
/**
* Delayed loading of typekit scripts vs Flicker-free loading
* Source: https://www.farbeyondcode.com/Delayed-loading-of-typekit-scripts-vs-Flicker-free-loading-5-2304.html
* Avg. Load Time: 66ms; 91ms; 113ms
*/
?>
<script type="text/javascript">
/* <![CDATA[ */
TypekitConfig = {