Skip to content

Instantly share code, notes, and snippets.

@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 {
@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
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 / examples.xml
Last active December 15, 2016 15:32
ICCCT-413 - Example XML structures for Exceptions, Numbered Lists, and Adding images/equations into sections
<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" >
<!--Unordered List-->
<ul class="no_mark">
<li>
<p>– Fire Safety (Chapters 7, 8, 9, 14, 26)</p>
</li>
<li>
<p>– Means of Egress (Chapters 10,11, Appendix E)</p>
</li>
map {
"node": <td xmlns="http://www.w3.org/1999/xhtml" class="border_left border_right" rowspan="1" colspan="1"/>,
"id": "IFC2015_Pt01_Ch01_SubCh02_Sec105.6.21"
}
map {
"node": <td xmlns="http://www.w3.org/1999/xhtml" class="border_left border_right" rowspan="1" colspan="1"/>,
"id": "IFC2015_Pt01_Ch01_SubCh02_Sec105.6.21"
}
map {
"node": <td xmlns="http://www.w3.org/1999/xhtml" class="border_left border_right" rowspan="1" colspan="1"/>,
@jschroed91
jschroed91 / multiline.html
Created January 11, 2017 13:47
html line length
<!-- ... -->
<div class="dropdown">
<button
type="button"
class="btn btn-secondary dropdown-toggle"
id="dropdownDemoButton"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
@jschroed91
jschroed91 / output
Last active January 26, 2017 17:19
explain query
+----+-------------+------------+--------+--------------------------------------------------------------------------+-----------------------+---------+------------------------------+-------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------+--------+--------------------------------------------------------------------------+-----------------------+---------+------------------------------+-------+--------------------------+
| 1 | PRIMARY | <derived2> | ALL | NULL | NULL | NULL | NULL | 28189 | Using where |
| 1 | PRIMARY | er | eq_ref | PRIMARY | PRIMARY | 4 |
<div style="text-align: center; width: 200px;">
<div style="line-height: 20px; padding: 20px; color: #333333; background: #ffffff;">#ffffff</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #fafafa;">#fafafa</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #f9f9f9;">#f9f9f9</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #f6f6f6;">#f6f6f6</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #f5f5f5;">#f5f5f5</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #f1f2f2;">#f1f2f2</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #eef0f2;">#eef0f2</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #ebebeb;">#ebebeb</div>
<div style="line-height: 20px; padding: 20px; color: #333333; background: #ebeaea;">#ebeaea</div>
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" id="IBC2015_frontmatter" class="frontmatter" epub:type="frontmatter">
<section id="IBC2015_titlepage" class="title_page" epub:type="titlepage">
<p>
<span class="content_center">
<img src="Images/Cover.jpg" alt="Cover" />
</span>
</p>
<p class="title_page_acronym">
<span class="content_center">
@jschroed91
jschroed91 / generated grep.txt
Last active March 15, 2017 17:14
proposal:auditlog:xml-ids --only-final-versions
(4/1498 - 0.27% - 4 hrs remaining - 418.0 MiB) [EB2-15][0] Generated xml id: IEBC2015_AppxA_SubChA1_SecA106.2
(4/1498 - 0.27% - 4 hrs remaining - 420.0 MiB) [EB2-15][0] Generated xml id: IEBC2015_AppxA_SubChA1_SecA107.1
(4/1498 - 0.27% - 4 hrs remaining - 420.0 MiB) [EB2-15][0] Generated xml id: IEBC2015_AppxA_SubChA1_SecA108.1
(4/1498 - 0.27% - 5 hrs remaining - 420.0 MiB) [EB2-15][0] Generated xml id: IEBC2015_AppxA_SubChA1_SecA113.7
(4/1498 - 0.27% - 5 hrs remaining - 420.0 MiB) [EB2-15][0] Generated xml id: IEBC2015_AppxA_SubChA2_SecA206.2
(4/1498 - 0.27% - 5 hrs remaining - 420.0 MiB) [EB2-15][0] Generated xml id: IEBC2015_AppxA_SubChA5_SecA505.1
(51/1498 - 3.4% - 1 hr remaining - 510.3 MiB) [EB33-15][0] Generated xml id: IEBC2015_AppxB_SecB101.3
(51/1498 - 3.4% - 1 hr remaining - 512.3 MiB) [EB33-15][0] Generated xml id: IEBC2015_AppxB_SecB101.4
(51/1498 - 3.4% - 1 hr remaining - 512.3 MiB) [EB33-15][0] Generated xml id: IEBC2015_AppxB_SecB102.2.3
(643/1498 - 42.92% - 11 mins remaining - 971.0 MiB) [RB2