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
<div class="sectionD" ng-repeat="employee in employees | limitTo: limitLength"> | |
<img class="empImg" src="img/employee_images/{{employee.image}}"> | |
<span class="textContent"> | |
<span>{{employee.name.first +" "+employee.name.last + " " + employee.position}}</span> | |
</span> | |
</div> |
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 | |
/** | |
* Class convincenator | |
* | |
* Helps you to learn maths. Run this file from the command line | |
* and you will become convinced that 2+2 = 5. | |
*/ | |
class convincenator | |
{ |
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
# found the solution here: http://ruby-doc.com/docs/ProgrammingRuby/html/tut_expressions.html | |
class Fixnum | |
alias actualPlus + | |
def +(other) | |
# gets the successor character which would be | |
# one digit higher than the result. | |
actualPlus(other).succ |
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 goes in your organization name loop | |
{{ | |
$preference = getOrgPreference(organizationName, event.event.organization); | |
}} | |
// And this is for your controller. | |
/** | |
* checks the orgname from the current column against the orgs in the event | |
* and returns the preference for the matching organization |
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 | |
$word = "typewriter"; | |
echo alphabetizerator($word); | |
/** | |
* Sorts a string passed to it in a more natural way. | |
* | |
* @param string $sort_me |
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 is an override for a function that ships in WordPress 3.9.0 and is | |
* required by the JSON REST API. | |
*/ | |
if (!function_exists('current_action')) { | |
function current_action() | |
{ | |
return current_filter(); | |
} | |
} |
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 | |
function get_all_cpts_in_db() { | |
global $wpdb; | |
if ( false === ( $cpts = get_transient( 'all_cpts_in_db' ) ) { | |
$cpts = $wpdb->get_col( "SELECT DISTINCT( `post_type` ) FROM {$wpdb->posts}" ); | |
set_transient( 'all_cpts_in_db', $cpts ); | |
} | |
return (array) $cpts; | |
} |
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 part resides in wp-config and is used to assign the domains | |
* | |
*/ | |
if ( !defined('ABSPATH') ) | |
define('ABSPATH', dirname(__FILE__) . '/'); | |
function domain_theme($domain) { | |
define('WP_SITEURL', 'http://'.$domain); |
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 | |
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ | |
define('WP_DEBUG', true); | |
if ( WP_DEBUG ) { |
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 is all you need in a walker class to change li elements to options. | |
class Walker_Nav_Menu_Dropdown extends Walker_Nav_Menu{ | |
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { | |
$output .= sprintf( "\n<option value='%s'>%s</option>\n", | |
$item->url, $item->title | |
); | |
} | |
} |
NewerOlder