Skip to content

Instantly share code, notes, and snippets.

View Ravenstine's full-sized avatar

Ten Bitcomb Ravenstine

View GitHub Profile
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;
}
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
@Ravenstine
Ravenstine / queue_episode_retrieval_proposal.md
Last active August 29, 2015 14:26
Queue Episodes Retrieval Proposal

Queue Episode Retrieval - Proposed Technical Approach

For our upcoming SSO features, we need a way for a user to retrieve new episodes for their Favorite shows through the KPCC app. To sum up our requirements:

  • Users should be able to retrieve up to n most recent episodes from their favorite shows per download.
  • Episodes downloaded to a user's queue should sync up across devices
  • Finished or deleted episodes in the queue should not be re-downloaded.

Through proofing out some approaches, I came to the conclusion that the simplest approach is the right one for what we want to achieve.

@Ravenstine
Ravenstine / testmap.kml
Last active August 31, 2015 17:23
testmap
<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://www.opengis.net/kml/2.2'>
<Document>
<name>Double Plus Good </name>
<description><![CDATA[Trip Map 1]]></description>
<NetworkLink>
<name>Double Plus Good </name>
<Link>
<href>http://mapsengine.google.com/map/kml?forcekml=1&amp;mid=z_Tk3EyXNpN8.k743LUvJRr1U</href>
</Link>
@Ravenstine
Ravenstine / project_full_circle_map.html
Last active August 31, 2015 21:15
Project Full Circle Map
<style>
#siteWrapper #page{
margin: none;
padding: none;
max-width: none;
}
main {
padding: 0 !important;
}
#fullcirclemap img{
@Ravenstine
Ravenstine / tx.kml
Created September 1, 2015 05:23
test
<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://www.opengis.net/kml/2.2'>
<Document>
<name>testmap1</name>
<description><![CDATA[]]></description>
<Folder>
<name>Untitled layer</name>
<Placemark>
<name>Point 1</name>
<styleUrl>#icon-503-DB4436-nodesc</styleUrl>