This file contains hidden or 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') | |
, app = express() | |
, server = require('http').createServer(app) | |
, io = require('socket.io').listen(server); | |
/** | |
* Http Server. | |
*/ | |
app.use(express.static(__dirname + '/public')); | |
app.use(app.router); |
This file contains hidden or 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 src="/test/socket.io/socket.io.js"></script> |
This file contains hidden or 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 file will hold the main styles for your website. */ | |
/* Featured Recipe Rotator */ | |
/* This should allow us to move stuff around within the block itself */ | |
#block-views-featured-recipe-rotator-block .view-content { | |
position: relative; | |
} |
This file contains hidden or 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
diff --git a/includes/services_sso_client.admin.inc b/includes/services_sso_client.admin.inc | |
index 1b8453b..9a4ef4e 100644 | |
--- a/includes/services_sso_client.admin.inc | |
+++ b/includes/services_sso_client.admin.inc | |
@@ -43,6 +43,21 @@ function services_sso_client_user_admin_form($form_state) { | |
'#description' => t('The url of the external account editing interface. Example: http://example.com/user/[uid]/edit. The [uid] portion will be replaced with the actual uid of the remote Drupal user account.'), | |
); | |
+ // Extra settings | |
+ $form['extra'] = array( |
This file contains hidden or 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 services_sso_server_helper_email_registration_name($edit, $account) { | |
//If it's an ons.org email, these won't be set! | |
$first_name = $account->field_profile_fname['und'][0]['value']; | |
$last_name = $account->field_profile_lname['und'][0]['value']; | |
//If this hook_username_generation returns false, then use the defaul method to generate a new name | |
if (!($new_name = module_invoke_all('username_generation', $account, $edit))) { | |
$new_name = str_ireplace('-', '', substr(drupal_html_class($first_name), 0, 1) . drupal_html_class($last_name)); | |
} |
This file contains hidden or 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
if (module_load_include('inc', 'ldap_authentication')) { | |
$form_state['values']['name'] = $username; | |
$form_state['values']['pass'] = $password; | |
$uid = _ldap_authentication_user_login_authenticate_validate($form_state)->uid; | |
} | |
if (!isset($uid)) { | |
$uid = user_authenticate($username, $password); | |
} |
This file contains hidden or 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 Deck = exports.Deck = function(newSize, newUpper, newLower) { | |
this.size = newSize || 10; | |
this.cards = []; | |
this.cardIterator = 0; | |
this.upperBound = newUpper || 1; | |
this.lowerBound = newLower || 10; | |
this._generateCards(); | |
} | |
Deck.prototype.getSize = function() { |
This file contains hidden or 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
Game.prototype.timer = function(seconds, callback) { | |
seconds || (seconds = 5) | |
var timerInterval = setInterval(function() { | |
if (--seconds==0) { | |
callback(); | |
clearInterval(timerInterval); | |
}, 1000*seconds); | |
} | |
This file contains hidden or 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
┌─( ryan ) - ( ~/git/rock-paper-scissors-node ) | |
└─> jitsu logs app rock-paper-scissors 10 | |
info: Welcome to Nodejitsu | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command logs app rock-paper-scissors 10 | |
info: Authenticated as mrryanjohnston | |
error: Error running command logs app rock-paper-scissors 10 | |
error: Nodejitsu Error (500): Internal Server Error | |
warn: Error returned from Nodejitsu | |
error: Error: socket hang up |
This file contains hidden or 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
-if (typeof title!=='undefined') | |
h1= title | |
-else | |
h1 'Default Title' |