Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom Maiaroto tmaiaroto

View GitHub Profile
@tmaiaroto
tmaiaroto / get_raw_sql.ts
Created Jun 24, 2020 — forked from slavivanov/get_raw_sql.ts
Get generated SQL query from Sequelize
View get_raw_sql.ts
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 Mar 16, 2020 — forked from antonfisher/material-ui-flexible-fixed-header-table.js
React.js Material-UI Table component with flexible height and fixed header
View material-ui-flexible-fixed-header-table.js
/*
* 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 Dec 30, 2019 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive
View embedded-file-viewer.md

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

View install-comodo-ssl-cert-for-nginx.rst

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

View _baseline.scss
// $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) {
View google_twunter_lol
4r5e
5h1t
5hit
a55
anal
anus
ar5e
arrse
arse
ass
@tmaiaroto
tmaiaroto / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// 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 Oct 20, 2012 — forked from mbostock/.block
Pie Chart
View README.md

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