Skip to content

Instantly share code, notes, and snippets.

function getChapterContent(PDO $db)
{
$sql = "SELECT id FROM Document WHERE slug = '2015-International--Building-Code' LIMIT 1";
$stmt = $db->query($sql);
$books = $stmt->fetchAll(PDO::FETCH_ASSOC);
if (empty($books)) {
echo "\nFailure!";
return false;
}
$bookId = $books[0]['id'];
@jschroed91
jschroed91 / README.md
Last active January 9, 2020 15:55
Caxy Github Labels

This is a labels.json file to be used with the github-labels tool (node). The github-labels tool creates labels on a github repository by using a json file defining the label names and colors.

This is Caxy's default labels that faciliate the Caxy code review process.

Usage

Install github-labels globally if you don't have it

$ yarn global add github-labels
@jschroed91
jschroed91 / index.js
Last active December 6, 2016 18:47
react profile/index.js
import React from 'react';
import Profile from './Profile';
import fetch from '../../core/fetch';
import Layout from '../../components/Layout';
const getQuery = url => (`{
profile(url:"${url}") {
word_count
processed_language
personality {
<p>Wall piers shall be analyzed according to the following procedure, which is diagrammed in Figure A1-2.</p>
<ol>
<li>For any pier,
<ol>
<li>The pier shear capacity shall be calculated as:
<div class="equation">
<table style="border-collapse: collapse; border-width: 0px;" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td style="vertical-align: middle;"><em>V<sub>a</sub></em> = <em>v<sub>m</sub>A<sub>n</sub></em></td>
<p>Gas cabinets shall be constructed in accordance with Section 5003.8.6 and shall comply with the following:</p>
<ol><li>Exhausted to the exterior through dedicated exhaust duct sysem installed in accordance with Chapter 5 of the International Mechanical Code.</li>
<li>Supply and Exhaust shall be ducts shall be enclosed in a one-hour rated shaft enclosure from the cabinet to the exterior. The average velocity of ventilation at the face of access ports or windows shall be not less than 200 feet per minute (1.02 m/s) with not less than 150 feet per minute (0.76 m/s) at any point of the access port or window.</li>
<li>Provided with an automatic sprinkler system internal to the cabinet.</li>
</ol>
@jschroed91
jschroed91 / diffOutput.txt
Last active January 26, 2016 15:29
ICC-2853 / cdpACCESS-11300
<table class="diffmod"><tbody><tr><td><ins class="diffins">For SI: 1 inch = 25.4 mm, 1 pound per square foot = 4.88 kg/m</ins><sup class="diffmod"><ins class="diffins">2</ins></sup><ins class="diffins">, 1 pound per cubic foot = 16 kg/m</ins><sup class="diffmod"><ins class="diffins">3</ins></sup><ins class="diffins">.</ins></td><ins class="diffins">
</ins></tr></tbody></table><table><tbody><tr><td><ins class="diffins">ci = Continuous insulation, NR = No requirement, LS = Liner system.</ins></td><ins class="diffins">
</ins></tr></tbody></table><table><tbody><tr><td><ins class="diffins">a. Assembly descriptions can be found in ASHRAE 90.1 Appendix A. Framed wall assemblies in Table 402.1.3 correspond to assemblies in ASHRAE 90.1, Appendix A with 3-1/2 studs spaced 16 inches apart measured center to center. Where using the R-value compliance method for building design, wall assemblies having other stud spacings and depths and having equivalent U-factors in ASHRAE 90.1, Appendix A shall be an alternative.. C
@jschroed91
jschroed91 / diffOutput.txt
Created January 25, 2016 23:27
ICC-5136 / cdpACCESS-12412
<p class="diffmod">Compliance with this section requires that the provisions identified in Sections R401 through R404 labeled as "mandatory" and Section R403.5.3 <ins class="diffins">shall </ins>be met. <ins class="diffins">Fenestration U-factor and SHGC shall not exceed the maximum values for the climate zone set forth in Table R402.1.2. </ins>The<ins class="diffins"> remaining components of the</ins> building thermal envelope shall <del class="diffmod">be greater than</del><ins class="diffmod">comply with either the minimum R-values</ins> or <del class="diffmod">equal to levels of efficiency and Solar Heat Gain Coefficient</del><ins class="diffmod">maximum U-factors for the climate zones specified</ins> in Table <del class="diffmod">402.1.1 or 402.1.3 of the 2009 </del><em class="diffmod"><del class="diffmod">International Energy Conservation Code</del></em><del class="diffmod">.</del><ul class="diffmod exception"><li><strong><del class="diffmod">Exception:</del></strong><del class="diffmod"> Supply and ret
@jschroed91
jschroed91 / diffOutput
Last active January 26, 2016 15:49
ICC-5135 / cdpACCESS 5584
<p class="diffmod">The exterior wall envelope shall be designed and constructed in a manner that prevents the accumulation of water within the wall assembly by providing a water-resistant barrier behind the exterior veneer as required by Section R703.2 and a means of draining to the exterior water that enters the assembly. <ins class="diffins">For climate zones 1 to 4 where Table N1101.7 (R301 designates the city as A - Moist, the means for preventing the accumliation of water within the wall assembly shall be provided by:</ins></p><ins class="diffins">
</ins><ol class="diffmod"><li style="padding-left:30px;"><ins class="diffins">A drained and ventilated air space not less than 3/8 inch deep behind the exterior veneer, over the full height and width of the wall,</ins></li><ins class="diffins">
</ins><li style="padding-left:30px;" class="diffmod"><ins class="diffins">An open drainage material complying with ASTM E2925, is installed behind the exterior veneer, over the full height and width of the wall,</ins></
filter:
excluded_paths:
- 'app/*'
checks:
php:
fix_php_opening_tag: false
remove_php_closing_tag: false
one_class_per_file: false
side_effects_or_types: false
no_mixed_inline_html: false
@jschroed91
jschroed91 / NEW TEXT
Created September 29, 2015 17:43
List Diffing Example 1
<p>The required capacity of each door opening shall be sufficient for the <span class="content_italics">occupant load</span> thereof and shall provide a minimum clear&nbsp;opening&nbsp;width of 32 inches (813 mm). The clear opening width&nbsp;of doorways with swinging doors shall be measured between the face of the door and the stop, with the door open 90 degrees (1.57 rad). Where this section requires a minimum clear opening width of 32 inches (813 mm) and a door opening includes two door leaves without a mullion, one leaf shall provide a minimum clear opening width of 32 inches (813 mm). In Group I-2, doors serving as &nbsp;<em>m</em><span class="content_italics">eans of egress</span> doors where&nbsp;used for the movement of beds shall provide a minimum clear opening width of&nbsp;41<sup>1</sup>/ <sub>2 </sub> inches (1054 mm). The maximum width of a swinging door leaf shall be 48 inches (1219 mm) nominal. The minimum clear opening height of doors shall be 80 inches (2032 mm).</p>
<ul class="exception">
<l