Skip to content

Instantly share code, notes, and snippets.

View Ravenstine's full-sized avatar

Ten Bitcomb Ravenstine

View GitHub Profile
# Main file for
require 'csv'
class Card
attr_writer :answer
attr_accessor :question
def initialize(question_input, answer_input)
@question = question_input
@answer = answer_input
@Ravenstine
Ravenstine / index.html
Created November 3, 2013 22:42 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
var validTriangle = function(a, b, c) {
return (( a + b > c) == true && ( a + c > b ) == true && (c+b>a) == true);
};
HTTPPort 8090 # Port to bind the server to
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000 # Maximum bandwidth per client
# set this high enough to exceed stream bitrate
CustomLog -
<Feed feed1.ffm> # This is the input feed where FFmpeg will send
File ./feed1.ffm # video stream.
@Ravenstine
Ravenstine / charcode_to_unicode_hex.js
Created February 10, 2015 23:47
charcode_to_unicode_hex.js
function charCodeToUnicodeHex(code) {
var codeHex = code.toString(16).toUpperCase();
while (codeHex.length < 4) {
codeHex = "0" + codeHex;
}
return "0x" + codeHex;
}
@Ravenstine
Ravenstine / vbscript_wine.md
Last active August 18, 2023 19:43
Installing VBScript in Wine (Linux)

How to Run VBScripts in Wine

It's very easy but not straight-forward or documented anywhere.

First, install Wine 1.6.2. This version probably isn't required, but it's the version that currently ships with Debian Jessie and it works with VBScript.

Install Winetricks and use it to add the following libraries:

  • wsh57
missing_object = Module.new{def self.present?; false; end; def self.method_missing(*args); nil; end}
@Ravenstine
Ravenstine / gist:aa316bbadbfef108dbbe
Last active August 29, 2015 14:25
couchbase_and_pouchdb

todo.js.coffee

startListening = () ->
  db = new PouchDB('http://localhost:4984/divisionx/')
  todos = document.querySelector('#todos')

  sync = ->
    opts = live: true
    db.replicate.to true, opts, syncError
    db.replicate.from true, opts, syncError
@Ravenstine
Ravenstine / cognito_schema_v1.md
Last active August 29, 2015 14:26
Cognito Data Schema v1

User Management Backend - Data Schema(for Cognito)

A document describing different datasets their key/values that need to exist to support content personalization for SSO users. Any references to JSON, ints, booleans, etc., imply serialization to a string value. The values LastModifiedDate and DeviceLastModifiedDate are implicit for every key/value pair.


Favorites

Stores a user's preferences for favorite entities (programs, topics, etc.)

| | | |

@Ravenstine
Ravenstine / gist:1e6bcc19e221989fa992
Created August 5, 2015 16:14
queue_episode_retrieval_proposal_v1.md
## hello