Skip to content

Instantly share code, notes, and snippets.

@fassetar
fassetar / git-hub-ribbon-custom.html
Last active August 29, 2015 13:58 — forked from thunsaker/git-hub-ribbon-custom.html
including Supported IE's
<!-- Add to the <head> section -->
<style type="text/css">
.git-ribbon {
background-color: #a00;
overflow: hidden;
position: absolute;
left: -3em;
top: 2.5em;
-moz-transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
@fassetar
fassetar / 0_reuse_code.js
Created November 6, 2015 20:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@fassetar
fassetar / livestream
Created November 17, 2015 19:18 — 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);
@fassetar
fassetar / index.html
Created December 12, 2017 16:12 — forked from WickyNilliams/index.html
parseTable.js - convert HTML table to array of objects
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>parseTable</title>
</head>
<body>
<table>
<thead>
<tr>
@fassetar
fassetar / client.c
Created September 12, 2018 15:16 — forked from suyash/client.c
UDP echo client-server implementation
#include <arpa/inet.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
int main() {
const char* server_name = "localhost";
const int server_port = 8877;