Skip to content

Instantly share code, notes, and snippets.

@couturecraigj
couturecraigj / README.md
Last active May 2, 2017 14:05
I want to be able to do as much code from JavaScript as I can to speed up delivery time so I created this jsonParser to help take JSON and turn it into sObjects quickly.

Implementation

  Account acct = (Account)CustomParser.jsonToSobject(
    '{ "Name": "Name 1", "AnnualRevenue": 120.0, "NumberOfEmployees": 500 }',
    'Account'
  )
@couturecraigj
couturecraigj / livestream
Created September 26, 2016 03:51 — forked from deandob/livestream
Node.JS function to remux mp4/h.264 video from an IP camera to a HTML5 video tag using FFMPEG
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream,
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible).
var reqUrl = url.parse(req.url, true)
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined;
if (cameraName) {
try {
cameraName = decodeURIComponent(cameraName);

Keybase proof

I hereby claim:

  • I am couturecraigj on github.
  • I am moosecouture (https://keybase.io/moosecouture) on keybase.
  • I have a public key whose fingerprint is 455D 7A7A A7E8 CC1F 7AA7 4A55 3322 6360 DCCC D135

To claim this, I am signing this object: