Skip to content

Instantly share code, notes, and snippets.

Avatar

Glenn Block glennblock

View GitHub Profile
@glennblock
glennblock / books.json
Created Sep 7, 2020 — forked from nanotaboada/books.json
A sample collection of books in JSON format
View books.json
{
"books": [
{
"isbn": "9781593275846",
"title": "Eloquent JavaScript, Second Edition",
"subtitle": "A Modern Introduction to Programming",
"author": "Marijn Haverbeke",
"published": "2014-12-14T00:00:00.000Z",
"publisher": "No Starch Press",
"pages": 472,
@glennblock
glennblock / Jobs.md
Last active Apr 27, 2020
Job search resources for women in Washington
View Jobs.md

Health Insurance

The first concern I had when leaving my work was health insurance. Online resources are not very clear, but of course my first stop was checking out the Healthcare marketplace and figure out my insurance budget. Then I found out here in WA there are insurance brokers (paid by the state) that can guide you through the best options. When I spoke with an insurance broker they gave me quotes for 2-3 providers, but also mentioned Apple Health, which is free insurance provided by the state. Apple Health is based on current income (and savings, like in my case, do not count as income), so if one makes under a certain amount of money they are eligible for this free insurance, which includes health, dental, and vision.

Right now, online resources outside of LinkedIn are very important. I find LinkedIn to be good for general networking or looking for job postings, but as a woman I have seen too many misogynistic

View iopipe-task.js
var logger = require('@iopipe/logger');
var iopipe = require('@iopipe/iopipe')(
{
token: module.webtask.secrets.iopipe,
plugins: [logger({ enabled: true })]
}
);
var handler = iopipe(
(event, context, callback) => {
execute(event, context, callback);
View stripe.js
'use latest';
import express from 'express';
import { fromExpress } from 'webtask-tools';
import bodyParser from 'body-parser';
import stripe from 'stripe';
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
View stripe-task.js
'use latest';
import express from 'express';
import { fromExpress } from 'webtask-tools';
import bodyParser from 'body-parser';
import stripe from 'stripe';
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
View gist:34e28dc294a6ad67d31bac62844bbb82
var express = require('express');
var Webtask = require('webtask-tools');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.json());
module.exports = Webtask.fromExpress(app);
app.get('/helloworld.html', function(req, res) {
View fslice
var fs = require('fs'), _ = require('underscore');
var source = './Dropbox/Camera Uploads/';
var dest = './picframe/';
var size = 1000;
var files = fs.readdirSync(source);
var sample = _.sample(files, size);
for(i=0;i<size;i++) {
console.log("Copying file: " + (i+1));
fs.copyFileSync(source + sample[i], dest + sample[i]);
}
View zerocrm-middleware
module.exports = createZeroCRMMiddleware;
function createZeroCRMMiddleware() {
return (req, res, next)=> {
const ctx = req.webtaskContext;
const compiler = ctx.compiler;
return compiler.nodejsCompiler(compiler.script, (error, webtaskFn) => {
if (error) return next(error);
View gist:8c573e53fd40d184ac87a417625605ed
const Authz = require('auth0-ext-compilers/lib/authorization');
const Factory = require('auth0-ext-compilers/lib/compilers/compilerFactory');
const Generic = require('auth0-ext-compilers').generic;
module.exports = Factory.createCompiler(zeroCRMHandler);
function zeroCRMHandler(func, ctx, cb) {
Authz.is_authorized(ctx, err => {
if (err) return cb(err);
func.secrets = ctx.secrets;
You can’t perform that action at this time.