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 ssoPublicSessions | |
*/ | |
class ssoPublicSessions extends publicSessions | |
{ | |
protected $ci_user = null; | |
public function __construct() |
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 express = require('express') | |
, http = require('http') | |
, mongojs = require('mongojs') | |
, db = mongojs('traffic') | |
, users = db.collection('users'); | |
var app = express(); | |
app.configure(function(){ | |
app.set('port', process.env.PORT || 8080); | |
app.use(express.logger('dev')); |
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
<a id="myelement" href="http://google.com" class="class1 class2 class3">Go to google</a> | |
<script> | |
$('a#myelement').attr('class').split(' ')[0]; | |
</script> |
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 | |
return array('adwords'); |
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 | |
/** | |
* Implements hook_views_data(). | |
*/ | |
function MYMODULE_views_data() { | |
$data = array(); | |
$data[' MYMODULE__global']['table']['group'] = t('My Module'); | |
$data[' MYMODULE__global']['table']['join'] = array( |
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
// Get all fields linked to entities. | |
$active = []; | |
$entities = field_info_instances('node'); | |
foreach ($entities as $entity) { | |
foreach ($entity as $field_name => $field_info) { | |
$active[] = $field_name; | |
} | |
} | |
$active = array_unique($active); |
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 | |
/** | |
* Implements of hook_query_node_access_alter(). | |
*/ | |
function my_search_module_query_node_access_alter(QueryAlterableInterface $query) { | |
$db_and = db_and(); | |
$language = i18n_language_interface(); | |
$db_and->condition($node . '.language', $language->language, '='); | |
$query->condition($db_and); |
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
// Search for this line (on line 92 for me) | |
if (obj.vars.rmtcallback) { | |
uri = Drupal.settings.basePath + obj.vars.rmtcallback + '/' + marker.rmt; | |
} | |
// And change it to | |
if (obj.vars.rmtcallback) { | |
uri = Drupal.settings.basePath + Drupal.settings.pathPrefix + obj.vars.rmtcallback + '/' + marker.rmt; | |
} |
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
# Start by following this tutorial | |
# http://pietervogelaar.nl/ubuntu-12-04-install-jetty-9/ | |
# Try checking your Jetty, getting the error JETTY_HOME not found? | |
root@ubuntu:/opt# service jetty check | |
** ERROR: JETTY_HOME not set, you need to set it or install in a standard location | |
# Solution | |
nano /etc/default/jetty | |
# Add following line |
OlderNewer