Skip to content

Instantly share code, notes, and snippets.

@import url('https://fonts.googleapis.com/css?family=Roboto');
@font-face {
font-family: 'Roboto';
src: url("https://fonts.googleapis.com/css?family=Roboto:300");
}
@font-face {
font-family: 'Source Sans Pro Semibold';
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Semibold.ttf");
import mongoose, { Schema } from 'mongoose';
const StepSchema = new mongoose.Schema({
name: { type: String, required: true },
description: String,
position: { type: Number, required: true },
date_added: { type: Date, default: Date.now },
date_modified: { type: Date, default: Date.now },
templates: [{ type: Schema.Types.ObjectId, ref: 'Template' }],
active: { type: Boolean, default: true },
// Subtracts the number of days to a Date and returns it
Date.prototype.subtractDays = function(days) {
var dat = new Date(this.valueOf());
dat.setDate(dat.getDate() - days);
return dat;
}
var StarsFrame = React.createClass({
render: function() {
let stars = [];
for (let i = 0; i < this.props.numberOfStars; i++) {
stars.push(
<span key={i} className="glyphicon glyphicon-star"></span>
);
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace epsilon_greedy
{
class Program
@Zyst
Zyst / clearly.css
Last active March 31, 2016 23:38
The CSS I use for Clearly, saving it here to have access to it in case I need a backup
/*
Background color: #222233
Foreground color: #D1D1D1
Links color: #64BEFA
Base font size: 24px
Line height: 1.5em
Line width: 36em
Monospace font: Menlo, Monospace, Consolas
Body/header font: BlinkMacSystemFont (Won't work outside of OS X)
Base CSS: Newsprint
# Had to show a friend how Euc algorithm for GCD works real quick
def euc(m, n):
r = m % n
if (r != 0):
euc(n, r)
else:
return n