Skip to content

Instantly share code, notes, and snippets.

View lonelydimple's full-sized avatar

Scott Robinson lonelydimple

View GitHub Profile
update = current_update
if update.version == 17
stop_working!
end
def stop_working!
break_template
email_developers_with_congratulatory_message
end
public class DocumentWriter {
public static void save(Document document) throws NotesException, DocumentSaveException {
try {
boolean result = document.save(false, false, true);
if (!result) {
TimeUnit.SECONDS.sleep(2);
result = document.save(false, false, true);
if (!result) {
throw new DocumentSaveException("Could not save document");
@lonelydimple
lonelydimple / bi-weekly-web-meeting.md
Last active December 30, 2015 20:48
Bi-Weekly Web Meeting

Next Meeting - 2013-12-18 - 1:00pm

Agenda

Scott

Dan

Noah

@lonelydimple
lonelydimple / dump.sh
Created December 4, 2013 19:23
ntn 1004
irb(main):004:0> Bond.find_by_bond_number('NTN 1044').updated_at
Bond Load (8.0ms) SELECT `bonds`.* FROM `bonds` WHERE `bonds`.`bond_number` = 'NTN 1044' LIMIT 1
=> Tue, 03 Dec 2013 23:20:18 CST -06:00
irb(main):005:0> exit
➜ mbc git:(choose_agency_to_apply_accounting_transaction) mysql -u app -h mysql1 mbc_production -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
@lonelydimple
lonelydimple / 0_reuse_code.js
Created December 3, 2013 17:06
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
@lonelydimple
lonelydimple / transaction_app.markdown
Last active December 23, 2015 07:39
transactions application

Updating bonds

MBC application (liability)

  • MBC is a bond lifecycle management system
  • it does not know anything about transactions
  • it allows you to update a bond
  • it specifies the rules revolving around bond updates/creations
  • it tracks bond changes and allow printing an endorsement document
  • it reports the bond changes to the transaction system
@lonelydimple
lonelydimple / FieldConverter.java
Created August 28, 2013 17:57
field list for NNAPP conversions
public String get(String fieldName) {
if (fieldName.equals("txtWrittenAmount")) {
return getWrittenAmount();
} else if (fieldName.equals("txtAmount")) {
return getBondAmount();
} else if (fieldName.equals("txtBondNo")) {
return getBondNumber();
} else if (fieldName.equals("txtPremium")) {
return getPremium();
} else if (fieldName.equals("txtPrincipal")) {
@lonelydimple
lonelydimple / domino_prr.vb
Last active December 10, 2015 21:38
PRR from DOMINO
Call rtitem.AppendText( "To: " + PRdoc.obligee(0) )
Call rtitem.AddNewLine(2)
Call rtitem.AppendText( "Re: " + PRdoc.bondNumber(0))
Call rtitem.AddNewLine(2)
theMsgDatePart = ""
If PRdoc.IssuedDt2(0) <> "" Then theMsgDatePart = "on "+ PRdoc.IssuedDt2(0)
Call rtitem.AppendText( "The above bond was issued "+ theMsgDatePart +" covering:")
Call rtitem.AddNewLine(2)
Call rtitem.AppendText(PRdoc.Description(0))
@lonelydimple
lonelydimple / CreateReportDoc.vb
Created December 18, 2012 14:38
CreateReportDoc function which is responsible for creating every ProgressRptUpdate First, the entire function, Then, the relevant bit for us.
Sub CreateReportDoc(isManual,PerVal)
Set PRdoc = PRdb.CreateDocument
Set doc = view.GetDocumentByKey(PRUNIDdoc.bondNumber, True)
If Not (doc Is Nothing) Then
PRdoc.Form = "ProgressReportUpdate"
agency = PRUNIDdoc.Agency(0)
agencytext = Cstr(agency)
def initialize_mismitched_activities
if attribute_present?(:mismatched_activities=)
self.mismatched_activities ||= Set.new
end
end
def merchants_underwriting_class_list=(list)
self.merchants_underwriting_class_numbers = list.to_s.split(/[^\d]+/).map{ |i| i.to_i }.sort.uniq
end