Skip to content

Instantly share code, notes, and snippets.

View TakashiSasaki's full-sized avatar

Takashi SASAKI TakashiSasaki

View GitHub Profile
// ==UserScript==
// @name Remove margin around messages in ChatGPT Conversation View
// @namespace https://gist.github.com/TakashiSasaki/80e09ad918e92fabc100b87c09da60db/
// @version 2024-04-29.3
// @description This script customizes the ChatGPT interface by reducing the margin around each message in the conversation view. It aims to create a tighter layout, thereby making the interface cleaner and allowing more content to be visible at once.
// @author Takashi Sasaki
// @website https://twitter.com/TakashiSasaki
// @match https://chat.openai.com/g/*
// @match https://chat.openai.com/c/*
// @match https://chat.openai.com/
@TakashiSasaki
TakashiSasaki / mute-x-tweets-on-search.user.js
Last active April 30, 2024 00:45
Automatically hides tweets from a muted user in the search results on X (formerly Twitter) when 'u' is pressed.
// ==UserScript==
// @name Mute X Tweets on Search
// @namespace https://gist.githubusercontent.com/TakashiSasaki/89402d3b8c2896b161bf8add4295e150
// @version 2024-04-29.2
// @description Automatically hides tweets from a muted user in the search results on X (formerly Twitter) when 'u' is pressed.
// @author Takashi Sasaki
// @match https://twitter.com/search?*
// @match https://twitter.com/home
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==UserScript==
// @name Add Delete Button for Chat Conversations on Claude.ai
// @namespace https://moukaeritai.work/chatgpt-delete-button
// @version 0.4.20240326
// @description Add a delete button to easily remove chat conversations on Claude.ai.
// @author Takashi Sasaki
// @homepage https://twitter.com/TakashiSasaki
// @match https://claude.ai/chats
// @grant none
// @downloadURL https://gist.githubusercontent.com/TakashiSasaki/dac0b1778eaeabfb9dcfb04dd386070c/raw/userscript.js
HKEY_CLASSES_ROOT_20240316.txt
HKEY_CURRENT_CONFIG_20240316.txt
HKEY_CURRENT_USER_20240316.txt
HKEY_LOCAL_MACHINE_20240316.txt
HKEY_USERS_20240316.txt
# Get the current directory
$currentDirectory = Get-Location
# Output the current directory
Write-Output "Test"
Write-Output "Current Directory: $currentDirectory"
# Encode in UTF-8
$utf8Encoded = [System.Text.Encoding]::UTF8.GetBytes($currentDirectory)
# This file is saved in UTF-8 with BOM when uploading to Gist.
Write-Output "This file is saved in UTF-8 with BOM when uploading to Gist."
# But it is recommended to save in UTF-16 LE if possible.
Write-Output "But it is recommended to save in UTF-16 LE if possible."
Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
public class WinAPI {
@TakashiSasaki
TakashiSasaki / enex2notion-error-log
Last active January 23, 2024 07:13
Error log when a file was too large to upload with enex2notion. The garbled text is due to the mingw terminal not understanding UTF-8, but it’s not a particular problem.
INFO: Uploading note 1169 out of 1243 '▒▒▒▒▒E▒_▒E▒▒▒▒▒[▒h --- ▒▒▒▒▒▒▒R▒▒▒▒▒Y ▒▒▒c▒@▒l▒}▒▒▒`▒▒▒f▒B▒A▒U▒▒▒Z▒▒▒^▒['
INFO: Uploading note 1170 out of 1243 '▒▒▒{▒▒`▒̏I▒▒'
WARNING: Failed to upload note '▒▒▒{▒▒`▒̏I▒▒' to Notion! Retrying...
WARNING: Failed to upload note '▒▒▒{▒▒`▒̏I▒▒' to Notion! Retrying...
WARNING: Failed to upload note '▒▒▒{▒▒`▒̏I▒▒' to Notion! Retrying...
WARNING: Failed to upload note '▒▒▒{▒▒`▒̏I▒▒' to Notion! Retrying...
ERROR: Failed to upload note '▒▒▒{▒▒`▒̏I▒▒' to Notion!
Traceback (most recent call last):
File "enex2notion\enex_uploader.py", line 20, in upload_note
File "enex2notion\enex_uploader.py", line 35, in _upload_note
@TakashiSasaki
TakashiSasaki / allow.txt
Last active January 20, 2024 04:46
DNS 許可リスト
mobile.pipe.aria.microsoft.com
browser.pipe.aria.microsoft.com
vortex.data.microsoft.com
device-metrics-us.amazon.com
s.youtube.com
collector.github.com
s.click.aliexpress.com
@TakashiSasaki
TakashiSasaki / ps-filter-by-name.ps1
Last active January 4, 2024 05:15
This PowerShell script prompts the user to enter a string that should match a part of a process's full path. It then filters all running processes to find ones where the executable path contains the provided substring. The script outputs a formatted table listing the process names, IDs, and their full executable paths that match the criteria. It…
$FilterString = Read-Host "Please enter a part of the process's full path"
$FilteredProcesses = Get-Process |
Where-Object { $_.MainModule -and ($_.MainModule.FileName -match $FilterString) } |
Select-Object Name, Id, @{Name="Path";Expression={$_.MainModule.FileName}}
$FilteredProcesses | Format-Table -AutoSize
Read-Host -Prompt "Press Enter to exit"
@TakashiSasaki
TakashiSasaki / settings.json
Created December 27, 2023 04:12
Default settings.jsoj of Windows Terminal
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false