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
.v-center, .vertical-center, .v-middle, .vertical-middle { | |
display: table-cell; | |
vertical-align: middle; | |
} |
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
var jQueryReady = function($) { | |
// Your code goes here... | |
console.log('jQuery Ready!'); | |
}; | |
// Make sure jQuery is ready. | |
if (typeof jQuery == 'undefined') { | |
var protocol = window.location.protocol; | |
if (protocol.charAt(protocol.length - 1) == ':') { |
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
<script language="javascript" type="text/javascript"> | |
var urlAddress = window.location.pathname; | |
var pageName = "A-Affordable Bail Bonds, Inc."; | |
function addToFavorites() { | |
if (window.external) { | |
window.external.AddFavorite(urlAddress,pageName) | |
} | |
else { alert("Sorry! Your browser doesn't support this function."); } |
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
REGEX: Parse URL into individual parts (Javascript: The Good Parts) | |
<script type="text/javascript" language="javascript"> | |
var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; | |
var url= "http://www.ora.com:80/goodparts?q#fragment"; | |
var results = parse_url.exec(url); | |
var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash']; |
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 | |
/** | |
* Returns all "public" meta items for $post in the form of an object | |
* Useful for reducing server calls | |
* | |
* @param int $post_id The ID of the post | |
* @return object | |
*/ | |
function post_meta_object($post_id) { | |
$meta = get_post_meta($post_id); |
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
# Place in your ~/.bash_profile | |
# cd to current finder window | |
function cdfinder() | |
{ | |
cd "$(osascript -e 'tell application "Finder"' \ | |
-e 'set myname to POSIX path of (target of window 1 as alias)' \ | |
-e 'end tell' 2>/dev/null)" | |
} |
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
alias such=git | |
alias very=git | |
alias wow='git status' | |
$ wow | |
$ such commit | |
$ very push |
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 | |
/** | |
* Returns image meta data based on the image ID supplied | |
* | |
* @param int $imageID The image post id | |
* @return array | |
*/ | |
public static function getImageMeta($imageID) | |
{ |
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
inherit_gem: | |
rubocop-github: | |
- config/default.yml | |
- config/rails.yml | |
AllCops: | |
Exclude: | |
- 'bin/*' | |
- 'Gemfile' | |
- 'Guardfile' | |
DisplayCopNames: true |
OlderNewer