Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@diogogpinto
diogogpinto / Instructions.MD
Created January 3, 2025 13:14
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method:

@in4in-dev
in4in-dev / perfect.php
Last active January 4, 2025 12:21
PHP VK audio unmask (decode extras)
<?php
//(js -> php) code. letter by letter
global $n, $i, $id;
$n = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN0PQRSTUVWXYZO123456789+/=";
$id = 12345; //YOUR USER ID
$i = [
'v' => function($e) {
return strrev($e);
@Ynng
Ynng / custom.css
Last active January 4, 2025 12:18
vscode vtuber logo
.editor-group-watermark > .letterpress{
background-image: url("https://raw.githubusercontent.com/Aikoyori/ProgrammingVTuberLogos/main/VSCode/VSCode-Thick.png") !important;
opacity: .75;
aspect-ratio: 3/2 !important;
}
@BarishNamazov
BarishNamazov / naive-ui.ts
Created April 22, 2024 18:59
Naive UI plugin for Nuxt that adds styles to the head tag. Removes style load lag. Use with caution as it increases rendered HTML size.
import { setup } from "@css-render/vue3-ssr";
import { defineNuxtPlugin, type NuxtSSRContext } from "#app";
export default defineNuxtPlugin((nuxtApp) => {
if (process.server) {
const { collect } = setup(nuxtApp.vueApp);
const originalRenderMeta = nuxtApp.ssrContext?.renderMeta;
nuxtApp.ssrContext = nuxtApp.ssrContext || ({} as NuxtSSRContext);
nuxtApp.ssrContext.renderMeta = () => {

How to stream in React Native ⼮

Prelude ䷿

  1. npx create-expo-app@latest
  2. npm run reset-project
  3. rm -rf node_modules
  4. npm i react-native-fast-encoder web-streams-polyfill @stardazed/streams-text-encoding react-native-fetch-api
  5. (optional) echo "BROWSER=none # prevents browser from auto opening" >> .env
@erubescent
erubescent / PornHub-TV.user.js
Last active January 4, 2025 12:11
enables the tv layout along with upcoming css edits.
// ==UserScript==
// @name PornHub TV
// @author itsmidnightyo
// @version 1.0.0
// @license GPL-3.0+; http://www.gnu.org/licenses/gpl-3.0.txt
// @description enables the pornhub tv layout as seen on PS4. [custom css edits have also been applied]
// @match http://*.pornhub.com/*
// @match https://*.pornhub.com/*
// @require http://code.jquery.com/jquery-latest.js
// @require https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js
@mbernson
mbernson / README.md
Created December 2, 2015 11:36
Publish openwrt log contents to MQTT

Router logging to MQTT

This configuration sends all (or part of) your OpenWRT logs to a MQTT broker. I'm writing it up here for future reference.

I made this so I can keep track of wireless clients as they associate and disassociate with my home network. This way, my home automation setup can make decisions based on that information. :)

Installation

@flipeador
flipeador / asynchrony-concurrency-simultaneity.md
Created June 21, 2024 03:25
Asynchrony, concurrency and simultaneity.

Asynchrony - Concurrency - Simultaneity

🔄 Synchrony

Synchrony implies that the execution of multiple tasks occurs sequentially one after the other. Tasks are like steps that are executed in order, each operation blocks the others until completion.

Task #1   ├───────────┤............................
Task #2   .............├────────────┤..............
@knightstempler
knightstempler / block_gc.txt
Created March 22, 2024 19:50 — forked from rapinsa/block_gc.txt
Block Adobe Hosts C:\drivers\etc\hosts
For anyone who might read this in the future, I've found the best solution to this problem. For some reason I didn't need to go through all these steps on my surface pro adobe programs, but my desktop gave me issues. So if you're still having issues after doing the following, read on.
If you just end the process in Task Manager, the pop-up comes back up eventually.
If you just delete the files in "C:\Program Files (x86)\Common Files\Adobe\AdobeGCClient" or the folder itself, they may just recreate themselves every day or two.
If you delete/disable the Adobe services or schedules in Task Scheduler, those may just come back too.
To solve these issues, I decided to make a .bat file that deletes every file in that AdobeGCClient folder (exact location may depend on your Adobe install folder) and schedule it to do this every time I log on/turn on my pc. So far that has worked for the past few days.