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 / Maintenance Page
Last active August 29, 2015 13:59
Maintenance Page
<!doctype html>
<title>Company Name</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@fassetar
fassetar / Dropdown-CheckList
Created April 18, 2014 03:53
Bootstrap Dropdown-CheckList
$('.dropdown-menu').on('click', function(e) {
if($(this).hasClass('dropdown-menu-form')) {
e.stopPropagation();
}
});
@fassetar
fassetar / headerCellTemplate.html
Created June 4, 2014 16:58
Font-Awesome Ng-grid Sorting
<div class="ngHeaderSortColumn {{col.headerClass}}" ng-style="{'cursor': col.cursor}" ng-class="{ 'ngSorted': !noSortVisible }">
<div ng-click="col.sort($event); sortOrder = !sortOrder;" ng-class="'colt' + col.index" class="ngHeaderText">
<div ng-show="(!col.showSortButtonDown() && !col.showSortButtonUp())" class="fa fa-fw fa-sort"></div>
<div class="fa fa-fw fa-sort-desc" ng-show="col.showSortButtonDown()"></div>
<div class="fa fa-fw fa-sort-asc" ng-show="col.showSortButtonUp()"></div>
{{col.displayName}}
</div>
</div>
<div ng-show="col.resizable" class="ngHeaderGrip" ng-click="col.gripClick($event)" ng-mousedown="col.gripOnMouseDown($event)"></div>
@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;
//https://steamcommunity.com/id/{users}/stats/{game}/?tab=achievements
var listtoRemove = [];
var input = "Halo 3:";
for (i = 0; i < document.getElementsByClassName("achieveRow").length; i++) {
var current = document.getElementsByClassName("achieveRow")[i];
if(current.attributes[0].value == '{"autoFocus":true,"focusable":true,"clickOnActivate":true}')
listtoRemove.push(current);
else if(current.children[1].children[0].children[1].outerText.search("Halo 3:") < 0)
listtoRemove.push(current);