Skip to content

Instantly share code, notes, and snippets.

View nickmartini's full-sized avatar

Nick Martini nickmartini

View GitHub Profile
string body = string.Format(@"Title: Product Price Request from AMOeasy Catalog{0}Date: {1}{0}********************************{0}Shopper Group: {2} (ID: {3}){0}{0}Shopper Username: {4} (ID: {5}){0}{0}Shopper Information{0}********************************{0}Name: {6} {7}{0}Phone # 1: {8}{0}Phone # 2: {9}{0}Fax #: {10}{0}E-mail 1: {11}{0}E-mail 2: {12}{0}Best Time to Call: {13}{0}{0}Product Details{0}********************************{0}Product ID: {14}{0}Supplier: {15}{0}Supplier SKU: {16}{0}Description: {17}{0}Order Qty/UM: {18}/{19}{0}********************************{0}", Environment.NewLine, DateTime.Now.ToLongDateString(), grp.name, grp.group_id, user.username, user.user_id, user.firstname, user.lastname, address1.phonenum1, address1.phonenum2, address1.faxnum, address1.email1, address1.email2, address1.bestcalltime, prod.product_id, prod.supplier.displayname, prod.supplier_sku, prod.shortdesc, prod.order_qty, prod.order_um);
function getDPDiopterDetails(obj) {
var a = obj.id;
var rptIndex = a.substring(0, a.indexOf("ddlDPModel"));
var userID = document.getElementById("ctl00_cMainContent_tbHiddenUserID").value;
var modelElement = document.getElementById(rptIndex + "ddlDPModel");
var diopterElement = document.getElementById(rptIndex + "ddlDPDiopters");
var productIDElement = document.getElementById(rptIndex + "tbDPHiddenProductID");
productIDElement.value = "-1";
//old asp.net
function travelTo(loc)
{
var currentLoc = String(window.location);
var lastIndex = currentLoc.indexOf("Members/");
var finalLoc = currentLoc.substr(0, lastIndex);
if (loc == "Catalog")
window.location = finalLoc + "Members/Catalog/Default.aspx";
public void ParseFile()
{
if (!this.hasdeliveries)
return;
XDocument data = XDocument.Load(this.file.FullName);
var q = from x in data.Elements("TRANSFER").Elements("MESSAGE")
select x.Value;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Net;
using System.IO;
using System.Xml;
using System.Xml.Linq;
public static string BuildDateDirectory()
{
string year = DateTime.Now.Year.ToString();
string month = DateTime.Now.Month.ToString();
string day = DateTime.Now.Day.ToString();
string hour = DateTime.Now.Hour.ToString();
string minute = DateTime.Now.Minute.ToString();
if (month.Length == 1)
month = string.Format("0{0}", month);
18:42 (nick) 8~>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>i>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>oooooooooooooeiereiiiiiiiiiiiiereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiieriiiIIIIIIIIIIIIIIIIIIIIIIIIIIIIERirrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
require 'pp'
require 'rubygems'
require 'relaxdb'
RelaxDB.configure :host => "localhost", :port => 5984, :design_doc => "app"
RelaxDB.use_db "music_scratch"
RelaxDB.enable_view_creation # creates views when class definition is executed
class Album < RelaxDB::Document
require 'rubygems'
require 'eventmachine'
require 'twitter'
require 'logger'
#this is me being too lazy to rewrite all of the sequel methods
AL_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../..")
require '../bebot/helpers/bebot'
class Twatbot
{
"_id": "08ca2bae9630e997c1c8e3df11f29061",
"_rev": "14-3332404294",
"artist": "Lovage",
"title": "Music to Make Love to Your Old Lady By",
"released": 2001,
"tracks": [
{
"title": "Ladies Love Chest Rockwell",
"length": "1:19"