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 makes it okay to hook up jQuery plugins in your main JS files | |
without worrying that they may not be included in the page (if you | |
perhaps only need this plugin on a few pages – not necessarily globally). | |
*/ | |
$(function(){ | |
// Do stuff |
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
/* | |
Custom style for Wordpress Highlight.js plugin. | |
By Johan Brook (dark on light colours). | |
*/ | |
pre code { | |
color: #c4cdc5; | |
} |
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
$slide_args = array( | |
"labels" => $slide_labels, | |
"public" => true, | |
"show_ui" => true, | |
"rewrite" => null, | |
"cabability_type" => "post", | |
"description" => __("Slides som syns på förstasidan"), | |
"supports" => array("title", "custom-fields", "thumbnail") | |
); |
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 | |
require_once (SALESFORCE_LIBS_PATH.'/soapclient/SforceEnterpriseClient.php'); | |
require_once (SALESFORCE_LIBS_PATH.'/soapclient/SforceHeaderOptions.php'); | |
class Salesforce_Connection { | |
protected $connection; | |
function __construct($loginname, $password){ | |
$this->connection = new SforceEnterpriseClient(); |
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
Output: | |
SimpleXMLElement Object( | |
[name] => Blah | |
[price] => Array | |
( | |
[0] => 19,31 | |
[1] => 16,39 | |
[2] => 15,65 | |
[3] => 2.12 |
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
email: [email protected] |
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 | |
/* | |
I have a programming problem I've been pondering over for some time this morning. I want to solve | |
in an efficient and neat manor, but I honestly haven't got many clues how to think here. Would appreciate | |
some assistance. | |
Short description: I want to be able to group nested arrays, and afterwards show this with a separator | |
or divider when I loop and print the array values. |
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
// Page init code is at the bottom | |
var Map = (function(map, $){ | |
var exports = map || {}; | |
var geo = new google.maps.Geocoder(), | |
geocode = { | |
address: [ config.project_location.street, | |
config.project_location.city, | |
config.project_location.country].join(", ") |
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
function get_related_posts($options = array("numberposts" => 4)) { | |
global $post; | |
$defaults = array( | |
"post__not_in" => array($post->ID) | |
); | |
$args = array_merge($options, $defaults); | |
$tags = wp_get_post_tags($post->ID); | |
$cats = wp_get_post_terms($post->ID, "category", array("fields" => "ids")); |
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
linkedin: function(json) { | |
var itemList = [], | |
template = global.linkedin_template; | |
$.each(json.post, function(){ | |
var date = new Date(parseInt(this['creation-timestamp'])), | |
picture = (this.creator['picture-url']) ? this.creator['picture-url'] : "<url till fallback>"; | |
var customData = { |