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
// Avoid `console` errors in browsers that lack a console. | |
if (!(window.console && console.log)) { | |
(function() { | |
var noop = function() {}; | |
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn']; | |
var length = methods.length; | |
var console = window.console = {}; | |
while (length--) { | |
console[methods[length]] = noop; | |
} |
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
@mixin base_font { | |
font-family: Helvetica, Arial, Sans-serif; | |
font-size: 16px; | |
line-height: 24px; | |
} |
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
add_action("gform_after_submission_1", "push_pdf", 10, 2); | |
function push_pdf($entry, $form) { | |
$host = $_SERVER['HTTP_HOST']; | |
preg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches); | |
global $post; | |
$postID = $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
<?php | |
// place in functions or a plugin | |
function cpt_taxonomy_dropdown($taxonomy) { ?> | |
<form action="/" method="get"> | |
<select name="cat" id="cat" class="postform"> | |
<option value="-1">Choose one...</option> | |
<?php | |
$terms = get_terms($taxonomy); | |
foreach ($terms as $term) { |
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
// check if running locally for livereload | |
var url = window.location.protocol + "//" + window.location.host + window.location.pathname; | |
// grab the reload script from grunt | |
if ( url == "http://portal.dev" ) { | |
var lr = document.createElement("script"); | |
lr.type = "text/javascript"; | |
lr.src="//localhost:35729/livereload.js"; |
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 | |
// Init vars | |
$LOCAL_ROOT = "/var/www/my_new_site"; | |
$LOCAL_REPO_NAME = "public_html"; | |
$LOCAL_REPO = "{$LOCAL_ROOT}/{$LOCAL_REPO_NAME}"; | |
$REMOTE_REPO = "[email protected]:jonathanstark/my_new_site.git"; | |
$DESIRED_BRANCH = "dev"; | |
// Delete local repo if it exists |
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
// session-service.js | |
this.setAuth = function(token) { | |
if (!!token && !localStorage.getItem('Token')) { | |
setTokenToLocalStore(token); | |
} | |
$http.defaults.headers.common.Authorization = token ? "Token " + token : localStorage.getItem("Token"); | |
} | |
// app-controller.js |
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
$scope.userBasicDetails.relationshipStages = [ | |
{ id : "Single", name: "Single"}, | |
{ id : "Married", name: "Married"} | |
]; | |
// TODO: Display the correct amount of days in dropdown according to month.days | |
$scope.userBasicDetails.months = [ | |
{ id : "Janurary", name: "Janurary", days: '31' }, | |
{ id : "February", name: "February", days: '28' }, | |
{ id : "March", name: "March", days: '31' }, |