Skip to content

Instantly share code, notes, and snippets.

@oravecz
oravecz / main.js
Last active August 29, 2015 13:56
EJS - Hello World
var {Application} = require( 'stick' );
var response = require( 'ringo/jsgi/response' );
var app = exports.app = new Application();
app.configure( 'route' );
app.get( '/', function ( req ) {
return response.html( 'Hello, World' );
} );
$(document).on("init", function(){
var frame;
if (mghApiLoaded) {
if(typeof MGH_API != "undefined"){
activityAPI = new MGH_API();
frame = new buildingblock(params);
frame.init();
} else {
setTimeout(arguments.callee, 100);
@oravecz
oravecz / async_example.js
Created July 6, 2014 01:08
Promises Presentation
(function() {
var a = 10;
setTimeout(function() {
a = a + 10;
}, 1000);
console.log('Value of a: ' + a);
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
{
"actor": {
"name": "Sally Student",
"account": {
"homePage": "https://connected.mcgraw-hill.com",
"name": "sally518"
}
},
"verb": {
"id": "http://mheducation.com/lrs/verbs/completed",
@oravecz
oravecz / example1.js
Last active August 29, 2015 14:05
Services Presentation
function myFilter( $locale ) {
var formats = $locale.NUMBER_FORMATS;
return something;
}
myFilter.$inject = ['$locale'];
$injector.invoke( myFilter );
$injector.invoke( ['$locale', myFilter] );
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"type": "object",
"properties": {
"about": {
"id": "#about",
"type": "object",
"required": [
"version"
{
"districts": [{
"sync": <boolean>,
"districtCEDId": <string>,
"districtENGId": <number|null>,
"districtName": <string>,
"schools": [{
"sync": <boolean>,
"schoolCEDId": <string>,
"schoolENGId": <number|null>,
@oravecz
oravecz / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@oravecz
oravecz / Instructions.md
Last active August 29, 2015 14:12
Setting up MHE DEV server

Setting up McGraw-Hill development server

  1. Setup new virtual machine in Virtual Box
  2. New image based on clean install of ubuntu-14.04.1-server-amd64.iso
    1. Setup networking to use bridged mode (gets its own ip address)
  3. Install openssh
    1. sudo apt-get install openssh-client
    2. sudo apt-get install openssh-server
    3. sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
  4. sudo chmod a-w /etc/ssh/sshd_config.original