Skip to content

Instantly share code, notes, and snippets.

View ynohat's full-sized avatar

Anthony Hogg ynohat

  • Akamai Technologies
  • Paris
  • X @ynohat
View GitHub Profile
@ynohat
ynohat / edgegrid_session.py
Last active April 11, 2024 16:22
Python 3 Edgegrid API client with switch key and retry support
from os.path import expanduser
import requests
from requests.adapters import HTTPAdapter, RetryError
from urllib3.util.retry import Retry
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from configparser import NoSectionError, NoOptionError
from urllib import parse
class EdgegridError(RuntimeError):
pass
@ynohat
ynohat / www.google.com.har
Last active November 11, 2018 02:47
www.google.com HAR for testing things
This file has been truncated, but you can view the full file.
{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [
{
"startedDateTime": "2018-11-11T02:47:08.795Z",
@ynohat
ynohat / list-mpulse-domains.js
Last active September 18, 2018 12:41
This bookmarklet prints a table in the developer tools mapping mPulse domains to their ids.
console.table(
Array.prototype.slice.call(
document.querySelectorAll("tr[objectname]"))
.map(function(t) {
return {
name: t.getAttribute("objectname"),
id:t.getAttribute("lid")
};
})
)
@ynohat
ynohat / trace-to-mp4.js
Created January 7, 2018 22:15 — forked from krisselden/trace-to-mp4.js
Make an mp4 out of a Chrome DevTools trace with screenshots.
#!/usr/bin/env node
// Converts a saved Chrome dev tools recording with Screenshots to mp4
const fs = require('fs');
const path = require('path');
const spawn = require('child_process').spawn;
const FPS = 60;
const MICROSEC_PER_FRAME = Math.round(1000000 / FPS);
if (process.argv.length < 3) {
console.log(`node ${path.relative('.', process.argv[1])} [DevToolsProfile]`);
process.exit(1);
@ynohat
ynohat / kibana2print.js
Last active January 17, 2018 05:42
KibanaToPrint Bookmarklet
(function() {
var toarr = Array.prototype.slice;
(function rm() {
var els = document.querySelectorAll(toarr.call(arguments).join(","));
toarr.call(els).forEach(function(el) { el.remove() })
})(
"nav.global-nav",
".toaster-container",
"kbn-top-nav",
"filter-bar",
@ynohat
ynohat / keybase.md
Created March 20, 2017 14:27
proof of id for Keybase

Keybase proof

I hereby claim:

  • I am ynohat on github.
  • I am ynohat (https://keybase.io/ynohat) on keybase.
  • I have a public key ASA29lGHNfy9FCISQ1qqt7xzx-gYrelDO7Q_k5vvo4gXlgo

To claim this, I am signing this object:

Verifying that +anthonyhogg is my blockchain ID. https://onename.com/anthonyhogg