Skip to content

Instantly share code, notes, and snippets.

View phistuck's full-sized avatar
🔴
The little things

PhistucK phistuck

🔴
The little things
View GitHub Profile
@phistuck
phistuck / deleteOrAddContacts.js
Last active April 23, 2023 23:10
Automation of contact deletion or addition via the Google Contacts page
// Public domain, or MIT if not legal.
// Run using the console on contacts.google.com
// Approve notifications
/** @type {(xPath: string) => HTMLElement[]} */
var $x = $x;
/** @type {(cssSelector: string) => HTMLElement} */
var $ = $;
@phistuck
phistuck / main.m
Last active April 8, 2023 12:55
A proof of concept to make sure that an NSButton with setKeyEquivalent:@"\r" next to an NSTableView responds to pressing Enter/Return when the table has the focus
// To compile, add AppKit.Framework to the required frameworks for the project
// Includes and modifies code from -
// https://github.com/eonil/CocoaProgrammaticHowtoCollection/tree/master/ComponentUsagesInObjectiveC/FileDropIntoTableView
// Created by Hoon H. on 2014/06/13.
// Copyright (c) 2014 Eonil. All rights reserved.
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/cocoa/task_manager_mac.h
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/cocoa/task_manager_mac.mm
// Copyright 2012 The Chromium Authors
@phistuck
phistuck / IndexedDB-As-Promised.js
Last active April 8, 2023 13:24
A simplistic Promise-based API for IndexedDB
// License - no author warranty/responsibility/guarantee public domain where allowed. Otherwise -
// License - no author warranty/responsibility/guarantee, can do whatever you want with the code where allowed. Otherwise -
// License - MIT.
(function ()
{
// Let the fun begin.
"use strict";
const
/** @const {Object<string, string>} */
@phistuck
phistuck / bookmarklet.js
Created November 13, 2017 07:49
Hide Irrelevant Twitter Notifications
javascript:(function() {
var node, array = [], iterator = document.evaluate("//li[contains(@class, 'js-stream-item') and .//span[contains(@class, 'Icon--magicrecs')]]", document);
while (node = iterator.iterateNext()) {
array.push(node)
}
for (x of array) {
x.style.cssText += "visibility: hidden !important";
}
}());
@phistuck
phistuck / Embedded.gist
Created January 5, 2016 18:22
Gist Trial
Hello!
@phistuck
phistuck / user-feedback-link-click.json
Created August 30, 2012 19:21
HAR from the Developer Tools Network panel when clicking on the User Feedback link