Skip to content

Instantly share code, notes, and snippets.

@mems
mems / README.md
Last active May 4, 2024 09:08
Fullres images of a https://www.fashionanthology.com/ galleries
@mems
mems / Third party SLA.md
Last active November 3, 2023 11:02
SLA for website third parties
@mems
mems / akamaiopen.sh
Last active June 9, 2023 14:18 — forked from mousavian/akamai.api.sh
Akamai Open API with Bash
#!/usr/bin/env bash
# See also https://github.com/akamai/akamaipowershell
usage() {
cat <<EOT
Usage: $(basename $0) -X value -s value -t value -a value -u value [-d value] [-h]
Options:
-s Client secret
@mems
mems / icloudtabs2md.js
Last active February 26, 2023 21:38
Generate a markdown links list from iCloud tabs
#!/usr/bin/env node
/*
Generate a markdown links list from iCloud tabs, on macOS
Usage:
./icloudtabs2md.js > icloudtabs.md
./icloudtabs2md.js | pbcopy
Require:
@mems
mems / ASP.Net dependency graph.md
Last active February 14, 2023 22:33
Build dependency graph of an ASP.Net project

For all files: HTML, JS, CSS, LESS, CSHTML, ASCX, ASPX, CS (SVC) And config files XML, JSON

Write a webpack loader to load backend templates dependencies.

C# Razor and Web Forms templates

Entry points: ^[^_].*\.cshtml$ and .aspx$ should be an entries points

  • WebForm templates (ASPX use ASCX controls) files are HTML/XML with processing instruction nodes
@mems
mems / gist:d54ad804d8d8d17d0011
Last active October 24, 2022 03:24
Found the Apple live stream URL
  1. Open http://www.apple.com/live/ which redirect to something like http://www.apple.com/live/2015-june-event/
  2. Find a loaded script like: /live/2015-june-event/scripts/2015-june-event.built.js
  3. Open this script and search p.events-delivery.apple.com.edgesuite.net You find something like http://p.events-delivery.apple.com.edgesuite.net/15pijbnaefvpoijbaefvpihb06/js_files/event
  4. append to it /url.json (details: host + path + url.json)
  5. Open the generated URL
  6. Found an URL like http://p.events-delivery.apple.com.edgesuite.net/15pijbnaefvpoijbaefvpihb06/m3u8/hls_mvp.m3u8

Now you can watch it in VLC or any other videoplayer that support M3U and MP4(H264+AAC)!

@mems
mems / Code coverage.md
Last active September 27, 2022 00:41
Web frontend code coverage

Every line of code we write today will end up as someone’s legacy code.

Everything that you write is going to disappears some day

RUM Code coverage, chose a 1h timeframe (per day) where 1% traffic run that the test

JS coverage

FES javascript instrimentation visualization

@mems
mems / msrdwa-for-all.user.js
Last active April 22, 2022 13:55
[Userscript] Microsoft Remote Desktop Web Access for all
// ==UserScript==
// @name Microsoft Remote Desktop Web Access for all
// @namespace memmie.lenglet.name
// @author mems <memmie@lenglet.name>
// @homepageURL https://gist.github.com/mems/e7277c1118e1d876dd7333bb8c2bb49b
// @description Allow to use RD Web Access on browser that don't support RD ActiveX
// @match *://*/RDWeb/Pages/*
// @updateURL https://gist.github.com/mems/e7277c1118e1d876dd7333bb8c2bb49b/raw/msrdwa-for-all.user.js
// @version 1.0.0
// ==/UserScript==
@mems
mems / gist:5301297
Last active February 23, 2022 13:12
How to convert a (simple) SWF to PDF

Convert (simple) SWF to PDF

In SWFTools a programs called gfx2gfx is available to do this task, but it's not officially available precompiled.

It can convert SWF, PDF or image to SWF, PDF, ebook or image.

For discard downscaling for rasterized image (default: 72dpi) we use the provided by @m-p-y: add -r attribute to increase maxdpi

Requirements

@mems
mems / Accessibility.md
Last active December 8, 2021 15:28
Web Lint

TODO