Skip to content

Instantly share code, notes, and snippets.

View tmaiaroto's full-sized avatar

Tom Maiaroto tmaiaroto

View GitHub Profile
@tmaiaroto
tmaiaroto / get_raw_sql.ts
Created June 24, 2020 01:04 — forked from slavivanov/get_raw_sql.ts
Get generated SQL query from Sequelize
import * as Sequelize from "sequelize";
import uuidv1 = require("uuid/v4");
import { SequelizeModelStatic } from "./sequelize";
import * as pLimit from "p-limit";
import _ = require("lodash");
/**
* Get generated SQL query from sequelize. Returns a promise that:
* 1. Adds a hook that receives the prepared options from Sequelize
* - Since hooks work on the whole model,
@tmaiaroto
tmaiaroto / material-ui-flexible-fixed-header-table.js
Created March 16, 2020 23:22 — forked from antonfisher/material-ui-flexible-fixed-header-table.js
React.js Material-UI Table component with flexible height and fixed header
/*
* React.js Material-UI Table and TableRow components with flexible height and fixed header
* - fixes "jumping" scrolling bar in WebKit browsers
* - shows permanent scrolling bar for other browsers
*
* Usage: import this Table and TableRow component instead of
* 'material-ui/Table' and 'material-ui/TableRow' component
*/
import React, {PropTypes} from 'react';
@tmaiaroto
tmaiaroto / embedded-file-viewer.md
Created December 30, 2019 19:18 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

// $base-font-size: 16px; // not sure this ever did anything
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
4r5e
5h1t
5hit
a55
anal
anus
ar5e
arrse
arse
ass
@tmaiaroto
tmaiaroto / 0_reuse_code.js
Last active August 29, 2015 14:12
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
@tmaiaroto
tmaiaroto / README.md
Created October 20, 2012 22:29 — forked from mbostock/.block
Pie Chart

This pie chart is constructed from a CSV file storing the populations of various age groups. The chart employs a number of D3 features: