Skip to content

Instantly share code, notes, and snippets.

-- SQL CLEAN UP --
/* Find jobs still owned by ppl */
SELECT name,*
FROM msdb..sysjobs
WHERE owner_sid = SUSER_SID('{USERNAME}')
exec msdb..sp_update_job
public bool SubmitOrder(Order objOrder, ref int iID, ref OrderResponse objOrderResponse, ref string sRtnMsg) {
try {
var contJson = JsonConvert.SerializeObject(objOrder);
var jsFormatted = JToken.Parse(contJson).ToString(Formatting.Indented);
Log.Trace("Submitting Order: With {0}", jsFormatted);
var flagError = false;
//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);
@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;
@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 / 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 / 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 / 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 / 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();
}
});