Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Mateosian semateos

View GitHub Profile
@semateos
semateos / server.js
Created Sep 28, 2016
SuperScript startup with clean facts db
View server.js
// This is the main Bot interface
var Promise = require('bluebird'),
superscript = require("superscript"),
mongoose = require("mongoose"),
fs = require("fs"),
facts = require("sfacts"),
rmdir = Promise.promisify( require('rimraf') ),
program = require('commander'),
parse = require("ss-parser")(),
View server.js
// This is the main Bot interface
var superscript = require("superscript");
var mongoose = require("mongoose");
var fs = require("fs");
var parse = require("ss-parser")();
mongoose.connect('mongodb://localhost/superscriptDB');
//websocket client to interact with Altered
var alteredClient = require('altered-api-client');
@semateos
semateos / index.html
Created Oct 15, 2014
polymer lazy loading fail
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>polymer import</title>
<script src="/bower_components/platform/platform.js"></script>
<link rel="import" href="/bower_components/polymer/polymer.html">
@semateos
semateos / router.js
Last active Dec 16, 2015
router for editing a single mongo object in meteor js
View router.js
var Router = Backbone.Router.extend({
routes: {
"": "index",
"edit/:id": "edit",
"new": "new"
},
//homepage
index: function(){
View jquery.spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.