Skip to content

Instantly share code, notes, and snippets.

View semateos's full-sized avatar

Sam Mateosian semateos

View GitHub Profile
@semateos
semateos / server.js
Created September 28, 2016 13:49
SuperScript startup with clean facts db
// 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")(),
// 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 October 15, 2014 14:49
polymer lazy loading fail
<!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 December 16, 2015 03:49
router for editing a single mongo object in meteor js
var Router = Backbone.Router.extend({
routes: {
"": "index",
"edit/:id": "edit",
"new": "new"
},
//homepage
index: function(){
/*
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.