Skip to content

Instantly share code, notes, and snippets.

@StewartLynch
StewartLynch / ZoomableScrollView.swift
Created March 17, 2024 23:57
A Zoomable and Scrollable Image View for SwiftUI
//
// Created for SwiftData Photo_Camera
// by Stewart Lynch on 2024-02-18
//
// Follow me on Mastodon: @StewartLynch@iosdev.space
// Follow me on Threads: @StewartLynch (https://www.threads.net)
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Subscribe on YouTube: https://youTube.com/@StewartLynch
// Buy me a ko-fi: https://ko-fi.com/StewartLynch
@invictus-ir
invictus-ir / CloudTrail.csv
Last active April 26, 2024 21:20
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9. in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@wellington1993
wellington1993 / URIFixup.jsm
Created May 15, 2020 15:51
resource://gre/modules/URIFixup.jsm
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* vim: sw=2 ts=2 sts=2 expandtab
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This component handles fixing up URIs, by correcting obvious typos and adding
* missing schemes.
* URI references:
@wellington1993
wellington1993 / ASRouter.jsm
Created May 20, 2020 00:42
view-source:resource://activity-stream/lib/ASRouter.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
XPCOMUtils.defineLazyGlobalGetters(this, ["fetch"]);
@wellington1993
wellington1993 / laboratory.js
Created May 20, 2020 00:43
view-source:moz-extension://d0fbaedd-149d-41c1-9640-f9472f5d1852/background_scripts/laboratory.js
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));const r=e=>new
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 21:20
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
@wellington1993
wellington1993 / SessionFile.jsm
Created May 20, 2020 00:44
view-source:resource:///modules/sessionstore/SessionFile.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["SessionFile"];
/**
* Implementation of all the disk I/O required by the session store.
@wellington1993
wellington1993 / util.js
Created May 20, 2020 00:43
view-source:moz-extension://390de5a6-0eba-49d3-8642-4a501d0bc440/background-scripts/
"use strict";
(function(exports) {
var VERB = 1;
var DBUG = 2;
var INFO = 3;
var NOTE = 4;
var WARN = 5;
// FYI: Logging everything is /very/ slow. Chrome will log & buffer
@Steveplays28
Steveplays28 / distant_horizons_shader_compatibility_information.md
Last active April 26, 2024 21:17
Distant Horizons shader compatibility info

Distant Horizons shader compatibility information

Distant Horizons v2.0.0 (and up) shader compatibility information.

v2

Prerequisites

  • Iris v1.7.0 or higher, or Oculus v1.6.15aDH or higher
  • Distant Horizons v2.0.2a or higher
@wellington1993
wellington1993 / content-script.js
Created April 7, 2020 01:15
moz-extension://993ff54e-e241-42fe-a4d9-3864dae1de3c/src/extension/content-script.js
const port = chrome.runtime.connect({name: 'contentScript'});
const dispatchCustomEvent = (type, detail) => {
window.dispatchEvent(new CustomEvent(type, {
detail: typeof cloneInto !== 'undefined' ? cloneInto(detail, window) : detail
}));
};
// receive message from panel via background
// and transfer to polyfill as event on window