Skip to content

Instantly share code, notes, and snippets.

@scragz
scragz / humanizer.md
Created April 9, 2025 15:17
humanizer

Writing Humanizer

Your task is to transform and humanize any piece of writing, ensuring it is clear, direct, and engaging. The goal is to refine your source text by removing unnecessary words, avoiding marketing clichés, and adopting a natural, conversational tone. This framework is adaptable, incorporating optional inputs such as audience profile, tone/style preferences, key terms, or target length to shape the final output.

Required Inputs

  1. Source Text or Message
    • The draft or piece of writing you want to refine.

Optional Inputs

  1. Audience Profile

Act as an expert security researcher specializing in code auditing. You are tasked with conducting a thorough security audit of the provided codebase.

Objective: Identify, prioritize, and propose remediation strategies for high-priority security vulnerabilities that could lead to system compromise, data breaches, unauthorized access, denial of service, or other significant security incidents. Assume a realistic threat model appropriate for the type of application (if known, otherwise assume a web application handling sensitive data).


Phase 0: Scoping & Context Gathering (Crucial First Step)

  • Clarify Scope: Before analysis, please ask any necessary clarifying questions about:
  • The programming language(s) and framework(s) used.

Act as an expert security researcher specializing in code auditing. You are tasked with conducting a thorough security audit of the provided codebase.

Objective: Identify, prioritize, and propose remediation strategies for high-priority security vulnerabilities that could lead to system compromise, data breaches, unauthorized access, denial of service, or other significant security incidents. Assume a realistic threat model appropriate for the type of application (if known, otherwise assume a web application handling sensitive data).


Phase 0: Scoping & Context Gathering (Crucial First Step)

  • Clarify Scope: Before analysis, please ask any necessary clarifying questions about:
  • The programming language(s) and framework(s) used.

I'm using svelte 5 instead of svelte 4 here is an overview of the changes.

Overview

Svelte 5 introduces runes, a set of advanced primitives for controlling reactivity. The runes replace certain non-runes features and provide more explicit control over state and effects.

$state

  • Purpose: Declare reactive state.
  • Usage:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Resource Schema",
"type": "object",
"description": "Schema for resources that offer various services, including information on accessibility, availability, and more.",
"properties": {
"id": {
"type": "string",
"description": "A unique identifier assigned to each resource for tracking and reference."
},
@scragz
scragz / unicoder.rb
Created April 18, 2012 16:59
Probably a dumb way to fix ugly latin1 garbage
class Unicoder
@@char_map = {
# (mostly cp1252) => utf8
"\x80" => "\u20AC", # EURO SIGN
"\x82" => "\u201A", # SINGLE LOW-9 QUOTATION MARK
"\x83" => "\u0192", # LATIN SMALL LETTER F WITH HOOK
"\x84" => "\u201E", # DOUBLE LOW-9 QUOTATION MARK
"\x85" => "\u2026", # HORIZONTAL ELLIPSIS
"\x86" => "\u2020", # DAGGER
"\x87" => "\u2021", # DOUBLE DAGGER
@scragz
scragz / .railsrc
Created March 31, 2011 22:55 — forked from janlelis/.railsrc
# .railsrc for Rails 3, encoding: utf-8
# see http://rbjl.net/49-railsrc-rails-console-snippets
if !Rails.application then warn "Rails isn't loaded, yet... skipping .railsrc" else
# # #
def ripl?; defined?(Ripl) && Ripl.instance_variable_get(:@shell); end
# # #
# loggers
<?php
function my_error_handler($errno, $errstr, $errfile, $errline){
$errno = $errno & error_reporting();
if($errno == 0) return;
if(!defined('E_STRICT')) define('E_STRICT', 2048);
if(!defined('E_RECOVERABLE_ERROR')) define('E_RECOVERABLE_ERROR', 4096);
print "<pre>\n<b>";
switch($errno){
case E_ERROR: print "Error"; break;
plugins/
kitchen-sink-html5-base/
docs/
wordpress/
intro_to_wordpress.html
theme/
customizing_icons.html
[etc.]
kst-extra-bonus-appliances/
docs/
<?php
class KST_Kitchen {
protected static $_appliances;
// Registers a loadable appliance and shortname for it
public function registerAppliance($shortname, $path, $class_name=false) {
if (array_key_exists($shortname, $_appliances)) {
// collision!
} else {
self::$_appliances[$shortname] = [];