Skip to content

Instantly share code, notes, and snippets.

View klochner's full-sized avatar

kevin lochner klochner

View GitHub Profile

Keybase proof

I hereby claim:

  • I am klochner on github.
  • I am klochner (https://keybase.io/klochner) on keybase.
  • I have a public key ASC-KjZ6uBhZC8Vq49IRxWTU0i1LZATvBksX83nkhbPB7Qo

To claim this, I am signing this object:

@klochner
klochner / gist:89cf497e9ca5ad84488fad41ab934466
Last active September 15, 2016 22:12
PML web request & response
req:
{"sLNm":"89DFEEB7-B67C-4D1C-8B63-A68200E942F0","sAllAppsHasCreditReportOnFile":"0","sLPurposeT":"1","IsProduction":"True","UseBpmiSingle":"False","UseBpmiSplit":"False","IsEnabledLockPeriodDropDown":"True","AvailableLockPeriodOptionsCSV":"15,30,45,60,75,90,,,","sProdRLckdDays":"60","sProdRLckdExpiredDLabel":"11/14/2016 (Assumes a 60-day lock.)","sSpAddr":"","sSpZip":"94597","sSpStatePe":"CA","sSpCounty":"Contra Costa","sSpCity":"Walnut Creek","sProdIsSpInRuralArea":"False","sOccTPe":"0","sSpGrossRentPe":"$0.00","sOccRPe":"100.000%","sHasNonOccupantCoborrowerPe":"False","sProdSpT":"0","sProdSpStructureT":"2","sProdIsNonwarrantableProj":"False","sProdIsCondotel":"False","sFhaCondoApprovalStatusT":"0","sProdCondoStories":"1","sIsRenovationLoan":"False","sTotalRenovationCosts":"$0.00","sLPurposeTPe":"1","sProdIsLoanEndorsedBeforeJune09":"False","sProdCashoutAmt":"$0.00","sProdCurrPIPmt":"$0.00","sProdCurrPIPmtLckd":"False","sProdCurrMIPMo":"$0.00","sIsCreditQualifying":"False","sHasAppraisal":"False","sSpLie
{"sLNm":"68012F41-2047-4B4E-B93E-A68101449392","sAllAppsHasCreditReportOnFile":"0","sLPurposeT":"1","IsProduction":"True","UseBpmiSingle":"False","UseBpmiSplit":"False","IsEnabledLockPeriodDropDown":"True","AvailableLockPeriodOptionsCSV":"15,30,45,60,75,90,,,","sProdRLckdDays":"60","sProdRLckdExpiredDLabel":"11/10/2016 (Assumes a 60-day lock.)","sSpAddr":"","sSpZip":"94597","sSpStatePe":"CA","sSpCounty":"Contra Costa","sSpCity":"Walnut Creek","sProdIsSpInRuralArea":"False","sOccTPe":"0","sSpGrossRentPe":"$0.00","sOccRPe":"100.000%","sHasNonOccupantCoborrowerPe":"False","sProdSpT":"0","sProdSpStructureT":"2","sProdIsNonwarrantableProj":"False","sProdIsCondotel":"False","sFhaCondoApprovalStatusT":"0","sProdCondoStories":"1","sIsRenovationLoan":"False","sTotalRenovationCosts":"$0.00","sLPurposeTPe":"1","sProdIsLoanEndorsedBeforeJune09":"False","sProdCashoutAmt":"$0.00","sProdCurrPIPmt":"$0.00","sProdCurrPIPmtLckd":"False","sProdCurrMIPMo":"$0.00","sIsCreditQualifying":"False","sHasAppraisal":"False","sSpLien":"$
const merge = (a1, a2) => {
const a22 = a2.slice();
return a1.reduce((out, e) => {
const index = a22.findIndex((i) => {return i > e});
return out.concat(a22.splice(0,index)).concat([e]);
}, []).concat(a22);
}
function merge(ray1, ray2) {
var out = [];
var index1 = 0;
var index2 = 0;
var length1 = ray1.length;
var length2 = ray2.length;
while (index1 < length1 && index2 < length2) {
var item1 = ray1[index1];
var item2 = ray2[index2];
if (item1 <= item2) {
@klochner
klochner / keybase.md
Created December 9, 2014 05:52
keybase.md
### Keybase proof
I hereby claim:
* I am klochner on github.
* I am klochner (https://keybase.io/klochner) on keybase.
* I have a public key whose fingerprint is BB95 4724 3DDE 55BA 16B3 0923 B9B8 24B2 9462 C374
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am klochner on github.
* I am klochner (https://keybase.io/klochner) on keybase.
* I have a public key whose fingerprint is 1934 D31D 2857 BBA4 699C D5EF 5239 6745 C3F7 E0D0
To claim this, I am signing this object:
#!/bin/bash
# Checks the files to be committed for the presence of binding.pry
# The array below can be extended for further checks
checks[1]="binding.pry"
element_count=${#checks[@]}
let "element_count = $element_count + 1"
ROOT_DIR="$(pwd)/"
mysql> select count(*) from communities;
+----------+
| count(*) |
+----------+
| 2451 |
+----------+
1 row in set (0.00 sec)
mysql> explain SELECT `communities`.* FROM `communities`
INNER JOIN `residents` on `residents`.`community_id` = communities.id
mysql> select count(*) from residents;
+----------+
| count(*) |
+----------+
| 601087 |
+----------+
1 row in set (0.21 sec)
mysql> select count(*) from users;
+----------+