Skip to content

Instantly share code, notes, and snippets.

View abusedmedia's full-sized avatar

Fabio Franchino abusedmedia

View GitHub Profile
  • Common setup for engineers with
    • laptop with encrypted hard drive
    • automatic updates (possibly forced, disabling delay)
    • password manager
    • 2FA everywhere
    • dedicated browser for development without extensions except for the ones approved by devsec ops
    • VPN to access internal properties
    • work (dedicate) GitHub account
    • rotate passwords and tokens / keys
  • remote dev machines on premise that can be kept secure and up to date by IT - might reduce chances to compromise engineer machine (accessible only via vpn)
@jeanlescure
jeanlescure / headless-chrome-ec2.md
Last active September 2, 2023 07:43
How to setup an EC2 instance to run Chrome Headless for usage with Puppeteer

Chrome Headless on EC2

For puppeteer usage

How to setup an EC2 instance to run Chrome Headless for usage with Puppeteer

1. Spin up ubuntu EC2 instance and ssh into it

ssh ubuntu@ec2-3-21-123-234.compute-1.amazonaws.com
@andrei-tofan
andrei-tofan / example.js
Last active February 29, 2024 23:59
node.js writable buffer stream (pdfkit example)
/**
* Convert PDFDocument to Base64
*/
const PDFDocument = require('pdfkit');
const stream = require('./stream');
// crate document and write stream
let doc = new PDFDocument();
let writeStream = new stream.WritableBufferStream();
@nolanlawson
nolanlawson / index.html
Last active December 5, 2023 07:14 — forked from bemson/index.html
Web Worker via blob URL
<!doctype html>
<html lang="en">
<body>
<span id="output"></span>
</body>
<script>
(function () {
var workerBlob = new Blob(
[workerRunner.toString().replace(/^function .+\{?|\}$/g, '')],
{ type:'text/javascript' }
@mbostock
mbostock / .block
Last active February 4, 2023 21:57
DOM-to-Canvas using D3
license: gpl-3.0