Skip to content

Instantly share code, notes, and snippets.

Avatar

Zev Averbach zevaverbach

View GitHub Profile
View gist:02c6a4d4675ca614cc9e1f699559a05c
// Copyright 2013 Soundslice LLC. License: BSD.
/* HTML example: ****************
<figure class="vid">
<video preload>
<source src="/videos/help/playhead.mp4" type="video/mp4">
<source src="/videos/help/playhead.webm" type="video/webm">
</video>
<p>To move the playhead, click in the timeline or drag the playhead’s diamond.</p>
@zevaverbach
zevaverbach / imapflow.d.ts
Created May 16, 2021
ImapFlow Type Declaration File -- not complete
View imapflow.d.ts
declare module "imapflow" {
type SequenceString = string;
export interface FetchQueryObject {
uid?: boolean;
flags?: boolean;
bodyStructure?: boolean;
envelope?: boolean;
internalDate?: boolean;
size?: boolean;
@zevaverbach
zevaverbach / notes.md
Last active Apr 7, 2021
Reading notes from "Software and Systems Security for CompTIA CySA+" on Pluralsight
View notes.md

Software and Systems Security for CompTIA CySA+

Examining the Software Development Lifecycle (SDLC)

  • ignored instructor's advice to set up penetration testing VMs

Phases

Planning

  • the most important phase
  • done by the most senior team members, with input from customers
@zevaverbach
zevaverbach / pre-commit
Created Dec 29, 2020
A Python script and a pre-commit hook that calls it for validating all the HTML files in a directory (recursively) on commit.
View pre-commit
# this goes in your local Git repo at .git/hooks/pre-commit
#!/bin/sh
errors=0
for i in $(find . -type f -name "*.html")
do
printf "$i:\n"
validate $i
exit_status=$?
if [ "${exit_status}" -ne 0 ];
@zevaverbach
zevaverbach / .gitignore
Last active Jun 11, 2020
.gitignore for Python and PyCharm
View .gitignore
.idea/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@zevaverbach
zevaverbach / bundle.js
Last active Dec 6, 2019
bundle.js from sveltejs/template (svelte 3.0.0)
View bundle.js
(function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.head.appendChild(r) })(window.document);
var app = (function () {
'use strict';
function noop() { }
function add_location(element, file, line, column, char) {
element.__svelte_meta = {
loc: { file, line, column, char }
};
@zevaverbach
zevaverbach / get_media_file_metadata.py
Created Aug 8, 2019
Get metadata from media files using ffprobe and Python
View get_media_file_metadata.py
"""
MIT License
Copyright (c) 2019 Zev Averbach
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@zevaverbach
zevaverbach / transcripts_from_yt.py
Last active Aug 6, 2019
Make transcripts from YouTube captions
View transcripts_from_yt.py
"""
MIT License
Copyright (c) 2019 Zev Averbach
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@zevaverbach
zevaverbach / coworking_spaces_speed.json
Last active Apr 9, 2019
Internet Speed Tests at Coworking Spaces in Geneva, Switzerland
View coworking_spaces_speed.json
[
{
"date": "9 Apr 2019",
"location": "Spaces Genève, Quai de l'île",
"ping": 4,
"down": 222.29,
"up": 213.07
}
]