Skip to content

Instantly share code, notes, and snippets.

View jxxe's full-sized avatar

Jerome Paulos jxxe

View GitHub Profile
@jxxe
jxxe / Claude.md
Created March 30, 2026 13:52
"Import memory" prompts

Export all of my stored memories and any context you've learned about me from past conversations. Preserve my words verbatim where possible, especially for instructions and preferences.

Categories (output in this order):

  1. Instructions: Rules I've explicitly asked you to follow going forward — tone, format, style, "always do X", "never do Y", and corrections to your behavior. Only include rules from stored memories, not from conversations.

  2. Identity: Name, age, location, education, family, relationships, languages, and personal interests.

  3. Career: Current and past roles, companies, and general skill areas.

@jxxe
jxxe / OneDarkPro.xccolortheme
Created October 30, 2023 04:19
OneDark Pro w/ Berkeley Mono & Univers — for Xcode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.602327 0.636254 0.702007 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>BerkeleyMono-Bold - 15.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.602327 0.636254 0.702007 1</string>
@jxxe
jxxe / laravelDocRedirect.user.js
Last active July 22, 2023 07:58
Redirect to latest Laravel documentation
// ==UserScript==
// @name Laravel Documentation Redirect
// @match https://laravel.com/docs/*
// @version 1.0
// @author Jerome Paulos
// @description Automatically redirect to the latest Laravel documentation
// @downloadURL https://gist.github.com/jxxe/fb8e52251e67fd269964c20bda846e1d/raw/laravelDocRedirect.user.js
// ==/UserScript==
(() => {
/**
* Checks if all characters of the needle exist in order in the haystack
* @param needle The search term
* @param haystack The string to search against
*/
export default function fuzzySearch(needle: string, haystack: string): boolean {
if(needle === '') return true;
needle = needle.toLowerCase().replaceAll(' ', '');
haystack = haystack.toLowerCase();
interface MenuResponse {
days: {
date: string,
cafes: { [key: string]: MenuCafe }
}[],
items: { [key: string]: MenuItem },
superplates: unknown,
goitems: { [key: string]: GoItem },
cors_icons: { [key: string]: CorsIcon },
version: 2
type SmoothAnimationOptions = {
condition: boolean,
addClass?: (node: HTMLElement) => void,
removeClass?: (node: HTMLElement) => void,
animationClass?: string
}
export function smoothAnimation(node: HTMLElement, { condition, addClass, removeClass, animationClass }: SmoothAnimationOptions) {
if(animationClass) {
if(!removeClass) removeClass = () => node.classList.remove(animationClass);
// ==UserScript==
// @name Laravel Documentation Redirect
// @match https://laravel.com/docs/*
// @version 1.0
// @author Jerome Paulos
// @description Automatically redirect to the latest Laravel documentation
// ==/UserScript==
(() => {
const latestUrl = document.querySelector('#version-switcher option[value*="/master/"] + option').value;
@jxxe
jxxe / hide_emails.html
Last active September 23, 2021 20:57
Hide email addresses from crawlers
<a email="ZW5jb2RlZEBlbWFpbC5jb20=">Enable JavaScript to view this email address</a>
<a email="YW5vdGhlckBlbWFpbC5jb20=">Enable JavaScript to view this email address</a>
<script>
document.querySelectorAll('[email]').forEach(email => {
let decodedEmail = atob(email.getAttribute('email'));
email.innerText = decodedEmail;
email.href = 'mailto:'+decodedEmail;
email.removeAttribute('email');
})
@jxxe
jxxe / Cache.php
Last active September 25, 2024 20:51
A quick and dirty PHP class to cache JSON data
<?php
const MONTH = "Y-m"; // 2000-01
const DAY = "Y-m-d"; // 2000-01-01
const HALF_DAY = "Y-m-d-A"; // 2000-01-01-AM
const HOUR = "Y-m-d-H"; // 2000-01-01-24
const MINUTE = "Y-m-d-H-i"; // 2000-01-01-24-60
class Cache {
@jxxe
jxxe / mysqli-fix.php
Last active September 25, 2020 21:21
Not all servers run the latest version of PHP or have enabled all the packages. This small replacement saved me a lot of frustration with my web host.
<?php
// Replace
$data = $query->fetch_all(MYSQLI_ASSOC);
// With
$rows = [];
while ( $row = mysqli_fetch_assoc($query) ) {
$rows[] = $row;
}
$data = $rows;