Skip to content

Instantly share code, notes, and snippets.

View rally25rs's full-sized avatar

Jeff Valore rally25rs

View GitHub Profile
@rally25rs
rally25rs / data.json
Created April 29, 2019 17:53
search sample data
[
"V004D000000007826042019160212558 Asap ABC Sales Sales 33019 1556312412 1 NORMAL Platform Toolkit API",
"V004E000000007926042019160212584 Asap ABC Sales Sales 33019 1556312472 1 NORMAL Platform Toolkit API",
"V004F000000008026042019160212609 Asap ABC Sales Sales 33019 1556312532 1 NORMAL Platform Toolkit API",
"V0050000000008126042019160212634 Asap ABC Sales Sales 33019 1556312532 1 NORMAL Platform Toolkit API",
"V0051000000008226042019160212659 Asap ABC Sales Sales 33019 1556312592 1 NORMAL Platform Toolkit API",
"V0052000000008326042019160212685 Asap ABC Sales Sales 33019 1556312652 1 NORMAL Platform Toolkit API",
"V0053000000008426042019160212711 Asap ABC Sales Sales 33019 1556312712 1 NORMAL Platform Toolkit API",
"V0054000000008526042019160212737 Asap ABC Sales Sales 33019 1556312712 1 NORMAL Platform Toolkit API",
"V0055000000008626042019160212761 Asap ABC Sales Sales 33019 1556312772 1 NORMAL Platform Toolkit API",
@rally25rs
rally25rs / kendo.binders.class.js
Created August 4, 2014 12:03
Class MVVM binder for Kendo UI
kendo.data.binders.class = kendo.data.Binder.extend({
init: function (target, bindings, options) {
kendo.data.Binder.fn.init.call(this, target, bindings, options);
// get list of class names from our complex binding path object
this._lookups = [];
for (var key in this.bindings.class.path) {
this._lookups.push({
key: key,
path: this.bindings.class.path[key]
@rally25rs
rally25rs / m503_m122.txt
Created February 6, 2020 11:10
Printer settings dump
Send: M503
Recv: echo: G21 ; Units in mm (mm)
Recv:
Recv: echo:Filament settings: Disabled
Recv: echo: M200 D1.75
Recv: echo: M200 D0
Recv: echo:Steps per unit:
Recv: echo: M92 X93.00 Y93.00 Z137.00 E104.00
Recv: echo:Maximum feedrates (units/s):
Recv: echo: M203 X300.00 Y300.00 Z5.00 E25.00
@rally25rs
rally25rs / MvcMockHelpers.cs
Created January 8, 2012 15:26
MvcMockHelpers.cs - Helper Utility for Mocking MVC3 Controllers with Moq.
using System;
using System.Collections.Specialized;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Moq;
/// <summary>
/// This helper class can be used to set up Moq mocks of MVC3 controllers.
/// Slightly modified from the original version from Scott Hanselman's blog:
@rally25rs
rally25rs / nginx_rails_sendfile.md
Last active July 7, 2023 09:17
nginx rails send_file madness

Goal: Have some static content, served by Nginx, but it requires an authenticated user. User auth is through Rails.

Project structure: The actual static files are in /home/vagrant/docs/ The browser will use the URL /help/* to access this content

The Ruby bits: RAILS_ENV=production rails server is used to start a WEBrick on port 3000.

config/environments/production.rb