Skip to content

Instantly share code, notes, and snippets.

View goody's full-sized avatar
💭
rimraf

Scot Goodhart goody

💭
rimraf
  • Luminix Inc.
  • Chicago/Coachella Valley
View GitHub Profile
// String to DateTime
String MyString;
MyString = "1999-09-01 21:34 PM";
//MyString = "1999-09-01 21:34 p.m."; //Depends on your regional settings
DateTime MyDateTime;
MyDateTime = new DateTime();
MyDateTime = DateTime.ParseExact(MyString, "yyyy-MM-dd HH:mm tt", null);
@goody
goody / Disable Context Menu
Created May 8, 2014 15:53
Disable context menu on img's
$('img').bind('contextmenu', function(e) {
return false;
});
@goody
goody / eRegConflicts
Created October 22, 2014 22:04
Session Conflicts
//eReg uses Prototype
//eReg loads the external JS file at the top of the page so the scripts need to wait for the DOM to be loaded before running
document.observe("dom:loaded", function() {
//prototype observere the two day session input buttons and fire on clicks
$('session_9984406_6071522_2').observe('click', function(event) {
@goody
goody / gist:c6bf46715b92688b3613
Created November 12, 2014 22:16
Fiddler POST
User-Agent: Fiddler
Content-Type : application/x-www-form-urlencoded
@goody
goody / jsongen
Created May 22, 2015 15:48
json-generator
[
'{{repeat(15, 45)}}',
{
NoticeNumber: '{{guid()}}',
Client: '{{integer(1,1000)}}',
LossDate: '{{date(new Date(2014, 0, 1), new Date(), "MM/dd/YYYY")}}',
Coverage: '10',
Claimant: '{{firstName()}}' + ' '+ '{{surname()}}',
ReceivedDate: '{{date(new Date(2014, 0, 1), new Date(), "MM/dd/YYYY")}}',
Location: '{{city()}}',
@goody
goody / index.html
Last active May 27, 2016 18:11
Native Sticky THEAD
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Sticky THEAD</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div style=" margin:20px;">
<div id="floating">
@goody
goody / data.json
Last active June 3, 2016 15:30
D3 Zoom
{"data":{"filters":{"tenant":"40181370-a2b8-11e5-aa93-17928327d92e","site":"448e74c9-5c0f-4fab-bebc-cd552e67f545","departments":["00000000-0000-0000-0000-000000000000"],"tests":{"instruments":[],"types":[],"codes":[],"priorities":[],"origin":[],"fluidTypes":[],"workforceCategories":[],"tatTarget":[]},"dataView":"","isAdhoc":false,"timeframeCode":"8","timeframeFrom":1451606400,"timeframeTo":1459382400,"timeframe":{"timeframeCode":"8","selectedDateRange":{"from":1451606400,"to":1459382400},"comparisonDateRange":{"from":1443657600,"to":1451520000}},"includePrevious":false},"widgets":{"tat":{"tatByTarget":{"tatGoal":75,"series":{"label":{"symbol":"tat","defaultText":"TAT"},"valueUnit":{"symbol":"minutes","defaultText":"Minutes"},"values":[{"percentTargetAchieved":{"current":12.5,"previous":2.7199999999999998},"tatTargetInMinutes":60,"minutesToReachGoal":300},{"percentTargetAchieved":{"current":31.830000000000002,"previous":32.33},"tatTargetInMinutes":120,"minutesToReachGoal":191},{"percentTargetAchieved":{"curren
@goody
goody / LICENSE
Created July 7, 2016 17:59 — forked from dfm/LICENSE
XKCD-style plots in d3
Copyright (c) 2012–2013 Daniel Foreman-Mackey
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@goody
goody / README.md
Last active July 15, 2016 19:59
Line chart with tips

init

#recursive(-r) search which matches any case(-i) and returns the path/file name(-l) in the c:/Code directory excluding any node_module directories
grep -rli --exclude-dir=node_modules "bi-dev-sns-data-process" c:/Code
#now excluding all node_modules and .git directories
grep -rli --exclude-dir={node_modules,.git} "bi-dev-sns-data-process" c:/Code