Skip to content

Instantly share code, notes, and snippets.

@Madhav-MKNC
Madhav-MKNC / .py
Created March 16, 2025 20:41
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""
@saddacracker
saddacracker / unbreak_snapchat.user.js
Created March 16, 2025 22:46 — forked from varenc/unbreak_snapchat.user.js
Unbreak Snapchat web. Disable focus tracking and screenshot prevention
// ==UserScript==
// @name Unbreak Snapchat web. Disable focus tracking and screenshot prevention
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description This userscript improves the Snapchat web experience by disabling screenshot prevention features which don't prevent screenshots but do actively harm the usability.
// @homepage https://gist.github.com/varenc/20e4dbfe8e7a2cc305043ffcbc5454d0
// @author https://github.com/varenc
// @match https://web.snapchat.com/*
// @icon http://snapchat.com/favicon.ico
// @license MIT
@rxaviers
rxaviers / gist:7360908
Last active March 16, 2025 22:45
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ivanagui2
ivanagui2 / restart coreaudio daemon
Created March 16, 2025 22:43 — forked from felipecsl/restart coreaudio daemon
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@felipecsl
felipecsl / restart coreaudio daemon
Last active March 16, 2025 22:43
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@szepeviktor
szepeviktor / Wistia-download-videos.md
Last active March 16, 2025 22:43
Download Wistia videos - Please do not misuse it!

Download Wistia videos

  1. right-click on the playing video, select Copy link
  2. find Wistia video ID in the copied link e.g. wvideo=tra6gsm6rl
    • alternative: look for e.g. hashedId=tra6gsm6rl in the page source
  3. load http://fast.wistia.net/embed/iframe/ + video ID in your browser
  4. look for "type":"original" in the page source and copy the URL from the next line e.g. "url":"http://embed.wistia.com/deliveries/129720d1762175bcd8e06dcab926ec76ad38ff00.bin"
  • alternative: look for "type":"hd_mp4_video"
@padeoe
padeoe / README_hfd.md
Last active March 16, 2025 22:41
CLI-Tool for download Huggingface models and datasets with aria2/wget: hfd

🤗Huggingface Model Downloader

Note

(2025-01-08) Add feature for 🏷️Tag(Revision) Selection, contributed by @Bamboo-D.
(2024-12-17) Add feature for ⚡Quick Startup and ⏭️Fast Resume, enabling skipping of downloaded files, while removing the git clone dependency to accelerate file list retrieval.

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, This command-line tool leverages curl and aria2c for fast and robust downloading of models and datasets.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
@grogy
grogy / code.cpp
Last active March 16, 2025 22:39
C++ read from binary file.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream in;
in.open("in.bin", ios::in | ios::binary);
{
"name" : "Forest Night",
"cursorColor": "#FFFFFF",
"selectionBackground": "#FFFFFF",
"background" : "#323d43",
"foreground" : "#d8caac",
"black" : "#465258",