Skip to content

Instantly share code, notes, and snippets.

@learnwell
learnwell / sample1.tex
Last active September 23, 2024 03:05
latex cheat sheet index card
%% Setup to use an index card
\documentclass[10pt]{book}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={3in,5in},total={2.9in,4.9in}}
%% render a frame marking the margins of a document
% \usepackage{showframe}
%% show landscape view
\usepackage{pdflscape}
@learnwell
learnwell / gist:91ccbe15b7c874f4048e75a58e2522f5
Created April 5, 2019 18:44
pdfkit - add page numbers in footer while new pages are added automatically
// create a document and pipe to a blob
var doc = new PDFDocument();
var stream = doc.pipe(blobStream());
doc.text('MY COVER PAGE');
doc.text('i will not add a page number in the footer here');
doc.text('please scroll down to see other pages');
doc.text('they do have page numbers starting with 1');
function footer(counter) {
// https://pdfkit.org/demo/browser.html
// create a document and pipe to a blob
var doc = new PDFDocument();
var stream = doc.pipe(blobStream());
doc.text('hello');
doc.text(lorem, {
columns: 3,
@learnwell
learnwell / bootstrap-grid-view.html
Created March 23, 2019 00:53
Working "Grid-View" example with bootstrap layout and cards
<div class="container">
<div class="row">
<div class="col-4 bg-secondary">
.row &gt; .col-xs-4
</div>
<div class="col-4 bg-primary">
.row &gt; .col-xs-4
this is
a much
taller
@learnwell
learnwell / README.MD
Created March 2, 2019 04:51
Use filter() method to check if an array of object includes what we seek

GOAL

Use filter() method to check if an array of object includes what we seek via TypeScript Sandbox online: https://typescript-play.js.org/#code/Q

// testing how the out-of-box `filter` for ES6 ecma works without utilities like lodash
// https://typescript-play.js.org/#code/Q
let knownFiles = [
 { file: 'xxx', status: 0 },
@learnwell
learnwell / gist:671a1d3817db7b66a9bc8b108ad50ac9
Created November 27, 2018 20:53
CH8 Problem 22 - Rotational Motion
A uniform disk turns at 2.4 rev/s around a frinctionless spindle. A nonrotating rod, of the
same mass as the disk and length equal to the disk's diameter, is dropped onto the freely
spinning disk. They then both turn around the spindle with their centers superposed. What is
the angular frequency in rev/s of the combination?
@learnwell
learnwell / README.md
Last active October 30, 2018 15:43
docker-compose template for using nodejs within a docker image without installing it on the host OS

Goal(s)

  • Use nodejs without installing it on the host OS
  • Use docker-compose to accomplish this

Step(s)

  1. On your local/remote machine:
    curl https://gist.githubusercontent.com/learnwell/953aa51d2322dad484178f3738513c71/raw/docker-compose.yml > docker-compose.yml`
    
@learnwell
learnwell / bio-ch5.mermaid
Created September 25, 2018 18:01
bio101 chapter5 mermaid diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.