Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active June 27, 2024 15:18
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@gd3kr
gd3kr / embeddings.py
Created February 15, 2024 20:35
compute embeddings for tweets in tweets.json
"""
a simple script that reads tweets inside a json file, uses openai to compute embeddings and creates two files, metadata.tsv and output.tsv, which cam be used to visualise the tweets and their embeddings in TensorFlow Projector (https://projector.tensorflow.org/)
"""
# obtain tweets.json from https://gist.github.com/gd3kr/948296cf675469f5028911f8eb276dbc
import pandas as pd
import json
from openai import OpenAI
import Foundation
import SwiftUI
// MARK: - Custom Button Style
struct MobileMeButtonStyle: ButtonStyle {
// MARK: Metrics
@ScaledMetric private var cornerRadius = 12
@ScaledMetric private var horizontalLabelPadding = 12
@ScaledMetric private var verticalLabelPadding = 8
@Kenny-MWI
Kenny-MWI / slack_tweaks.md
Last active July 2, 2024 11:20
Slack Tweaks

Slack Tweaks

In Fall 2023, Slack introduced an updated client with some unpopular UI changes. The tweaks in this document can be used to revert to the old client or hide the new side bar. These will reset every time you fully close Slack but they are easy to re-apply once you get the hang of it.

(Cross Platform) Open Dev Tools [Preferred Option]

To run any of these scripts, you'll need to open the Dev Tools (or Console). You can do this by typing /slackdevtools in a Slack channel or direct message. These are the same Dev Tools you'd get in Chrome if you hit F12. Along the top are tabs for Elements, Console, Sources, Network, etc. You'll want to paste these scripts into the Console tab at the > prompt.

If Slack disables this command, then you can open Dev Tools by setting a system-wide environment variable and using a keyboard shortcut to open the console. If /slackdevtools worked for you then you can skip these next two sections.

(Mac OS) Enable Dev Mode

@thisbit
thisbit / googleSheetsEndpoint.js
Created July 15, 2023 07:51
Google Sheets as JSON, use this with Extensions > App Script in google sheets
function getSheetDataAsJSON() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var range = sheet.getDataRange();
var values = range.getValues();
var headers = values[0];
var jsonData = [];
for (var i = 1; i < values.length; i++) {
var row = values[i];
var rowObj = {};
@jetfir3
jetfir3 / tmpdevmodify.sh
Last active June 17, 2024 09:58
Temporarily enable developer mode for the Spotify desktop client on Linux and macOS.
#!/usr/bin/env bash
# Temporarily enable developer mode for the Spotify desktop client on Linux and macOS.
showHelp () {
echo -e \
"Usage: ./tmpdevmodify.sh [option]\n
Options:
-c, --clearcache Clear Spotify app cache
-d, --debug Add Debug Tools to user dropdown menu
@tyhallcsu
tyhallcsu / Extract Dropbox Image URLs to Clipboard.js
Last active January 17, 2024 22:36
This is a userscript that extracts image URLs from a Dropbox page and copies them to the clipboard when a button is clicked. The script creates a button on the page that, when clicked, scrolls to the bottom of the page, waits for new images to load, and extracts the image URLs. The script then joins the URLs into a string separated by newlines a…
// ==UserScript==
// @name Bulk Export Dropbox Image URLs (2024)
// @version 3.1.1
// @description Extracts image URLs from a Dropbox page and copies them to the clipboard when a button is clicked.
// @author sharmanhall
// @supportURL https://github.com/tyhallcsu/dropbox-image-url-extractor/issues/new
// @namespace https://github.com/tyhallcsu/dropbox-image-url-extractor
// @homepageURL https://github.com/tyhallcsu/dropbox-image-url-extractor
// @license MIT
// @connect greasyfork.org
@troyhunt
troyhunt / Eye4Fraud-SiteName-Values.csv
Last active May 10, 2024 04:51
Eye4Fraud SiteName values
Lovelyskin 3338541
Jomashop Magento 2342771
iTechDeals 1411036
tilebar.com 910699
AppliancesConnection 663130
CANADIANAPPLIANCE.CA 645213
MoodFabrics 585985
Botach.com 488274
BeachCamera 483356
ezcontactsusa 464685
@STiXzoOR
STiXzoOR / TeamViewer-15-id-changer-for-mac.py
Last active June 18, 2024 15:47 — forked from 0x2a94b5/TeamViewer-15-id-changer-for-mac.py
Teamviewer 15 ID Changer for macOS (Python 3)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# System: macOS 12+
# Version: TeamViewer v15.x.x
# Python: 3.x.x
# Command: sudo python TeamViewer-15-id-changer.py
#
import os