Skip to content

Instantly share code, notes, and snippets.

Security Checklist (What can be done in CursorAI & software-level not infrastructure!)

Configuration Security

  • Detect secrets in code
  • Identify secrets committed to version control
  • Flag hardcoded credentials

Authentication & Authorization

  • Identify missing authentication checks
  • Detect improper authorization patterns
// For the new DOTS animation. Although you need to use DrawMeshInstanced yourself, Hybrid renderer does not support instanced
// props for builtin.
Shader "Custom/VertexSkinning"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
@rajibdpi
rajibdpi / Ubuntu Application Button right to left.md
Created March 2, 2021 18:19
How can move the "Show Applications" button in dock from right to left in Ubuntu Desktop?

This command will move it to the top:

gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top true

Use this to undo it:

gsettings set org.gnome.shell.extensions.dash-to-dock show-apps-at-top false

These commands can also be used to move the "Show Applications" button in dock from right to left or vice versa.

@willccbb
willccbb / grpo_demo.py
Last active March 28, 2025 02:39
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
@rcarmo
rcarmo / automator.py
Last active March 28, 2025 02:39
macOS Services in the style of NotesOllama
# Drop this into Automator using Python 3 as the shell
from sys import stdin
from json import dumps, loads
from urllib.parse import urlencode
from urllib.request import Request, urlopen
AZURE_ENDPOINT="getyourowndeployment.openai.azure.com"
OPENAI_API_KEY="getyourownkey"
OPENAI_API_VERSION="2023-05-15"
-- Carefull setup script is slow
-- SETUP SCRIPT :: START --
DROP TABLE IF EXISTS docs;
CREATE TABLE docs (
id SERIAL PRIMARY KEY,
type varchar(40) DEFAULT 'pdf' NOT NULL,
status varchar(40) NOT NULL,
sender_reference varchar(40) NOT NULL,
sent_at TIMESTAMPTZ,
@t3dotgg
t3dotgg / try-catch.ts
Last active March 28, 2025 02:35
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@JySzE
JySzE / mpv.conf
Last active March 28, 2025 02:34
JySzE MacOS MPV Config [ No longer maintained ]
# MacOS Version 1.1
# 03/09/2025
# Requires MPV v0.38.0 or newer
###############################################################################################################################################
# Player GUI Options
###############################################################################################################################################
@rxaviers
rxaviers / gist:7360908
Last active March 28, 2025 02:31
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:
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active March 28, 2025 02:30
ๅ›ฝๅ†…็š„ Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ๏ผŒ็”ฑๅ›ฝๅ†…ๆ•™่‚ฒๆœบๆž„ไธŽๅ„ๅคงไบ‘ๆœๅŠกๅ•†ๆไพ›็š„้•œๅƒๅŠ ้€ŸๆœๅŠก | Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ

ๅ›ฝๅ†…ไปŽ Docker Hub ๆ‹‰ๅ–้•œๅƒๆœ‰ๆ—ถไผš้‡ๅˆฐๅ›ฐ้šพ๏ผŒๆญคๆ—ถๅฏไปฅ้…็ฝฎ้•œๅƒๅŠ ้€Ÿๅ™จใ€‚

Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

1๏ธโƒฃ Docker daemon ้…็ฝฎไปฃ็†๏ผˆๆŽจ่๏ผ‰

ๅ‚่€ƒ Docker daemon ้…็ฝฎไปฃ็†