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
#!/bin/bash | |
# chkconfig: 2345 98 02 | |
# | |
# description: PM2 next gen process manager for Node.js | |
# processname: pm2 | |
# | |
### BEGIN INIT INFO | |
# Provides: pm2 | |
# Required-Start: | |
# Required-Stop: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="format-detection" content="telephone=no" /> | |
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 --> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> | |
<link rel="stylesheet" type="text/css" href="css/index.css" /> | |
<title>Hello World</title> | |
</head> |
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
class Player | |
DIRS = [:forward, :backward] | |
def initialize | |
@dir = :forward | |
end | |
def play_turn(warrior) | |
@warrior = warrior |
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 how you generate unique DOM IDs in XSLT for use in generating HTML --> | |
<!-- generate the unique ID with "uid-" prefix and assign it to the uid variable --> | |
<xsl:variable name="uid"> | |
<xsl:value-of select="concat('uid-',generate-id(.))"/> | |
</xsl:variable> | |
<!-- now use the unique id to generate a <label>-<select> pair --> | |
<label for="{$uid}">Menu:</label> | |
<select id="{$uid}"> |
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
<!-- footnote heeds to toggle the corresponding footnote div --> | |
<xsl:template match="aos:footnote" mode="aos-content"><xsl:variable name="footnoteNumber"><xsl:apply-templates select="." mode="get-footnote-number"/></xsl:variable><sup id="footnote-{$footnoteNumber}-link" class="footnote-link"><a href="#" onclick="revealFootnote('#footnote-{$footnoteNumber}'); return false"><xsl:value-of select="$footnoteNumber"/></a></sup> | |
</xsl:template> |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'ruby-debug' | |
#gem 'camping', '~> 2.0' | |
#gem 'reststop', '~> 0.3' | |
$: << '../../camping-camping/lib' | |
$: << '../lib' | |
require 'camping-unabridged' |
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
$(document).ready(function() { | |
rollcall = new S3.Rollcall('http://proto.encorelab.org:7070') | |
token = rollcall.getCurrentToken() | |
rollcall.fetchSessionForToken(token, function(data) { | |
console.log(data.session.user.username) | |
console.log(data.session.user.encrypted_password) | |
// log in to xmpp from here using those credentials | |
} | |
} |
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
// uses jquery.url.js --> https://github.com/allmarkedup/jQuery-URL-Parser | |
var S3 = window.S3 || {} | |
S3.Rollcall = function(url) { | |
this.url = url | |
} | |
S3.Rollcall.prototype = { | |
/** |
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
require 'rubygems' | |
require 'xmpp4r/client' | |
require 'xmpp4r/roster' | |
require 'colored' | |
require 'pp' | |
include Jabber | |
Jabber.debug = true |
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
require 'rubygems' | |
require 'blather/client' | |
# CONFIGURATION | |
jid = 'tester@proto.encorelab.org' | |
password = "foofoo" | |
chatroom = "s3@conference.proto.encorelab.org" | |
setup(jid, password) |
OlderNewer