John Cox

Blogs · @wyome

Tagged programming · everything

Advanced CodeIgniter Profiling With XHProf | Nettuts+

This tutorial explains how to install Facebook's XHProf profiler on a production server and integrate it with CodeIgniter applications using hooks to monitor real-world performance. XHProf provides hierarchical function-level profiling with minimal overhead, showing wall time, CPU usage, and memory consumption, and includes features like call graphs, run comparisons, and aggregated analysis across multiple page loads. The guide covers installation from source on Ubuntu, CodeIgniter integration setup, and interpretation of profiling results to identify bottlenecks in database calls and external service requests.

Permalink

RequireJS

RequireJS is a module loader for JavaScript that works in browsers and other environments, enabling developers to organize code into modular dependencies rather than managing multiple script tags. The tool offers broad browser compatibility and improves code speed and maintainability through its modular architecture. It provides an API for defining and loading dependencies asynchronously.

Permalink

phpmaster | Working with MySQL Events

MySQL events are time-triggered objects that execute SQL commands on a schedule, offering an alternative to cron jobs for database-specific tasks like purging old records or aggregating data. The article explains how to enable the event scheduler, create one-time or recurring events with specific start and end dates, view and modify existing events, and demonstrates a practical example of using events to automatically publish scheduled blog posts at designated times. Unlike triggers which respond to data changes, events execute based on elapsed time and cannot run external code, making them suitable only for MySQL-internal operations.

Permalink

Regex Tester – RegexPal

This is a regex cheat sheet covering the core syntax for pattern matching: character classes like `\w` for words and `[a-z]` for ranges, anchors like `^` and `\b` for positions, quantifiers like `*` and `{2,}` for repetition, and groups with lookahead/lookbehind for complex matching logic. It's a quick reference for constructing regular expressions across most programming languages.

Permalink

Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot

This reference sheet provides a side-by-side comparison of JavaScript, Python, PHP, and Ruby across multiple programming domains—from basic grammar and variables through advanced features like threads and databases. It covers syntax differences (like how each language defines functions, handles string interpolation, and structures control flow), built-in data types and operations (arrays, dictionaries, mathematical functions), and practical facilities (regular expressions, date/time handling, exception management). The second sheet extends the comparison into areas like file I/O, web functionality, object-oriented programming, reflection, and testing, making it a comprehensive quick-reference guide for developers working across these four languages or learning a new one by comparison.

Permalink

A re-introduction to JavaScript - MDN

This guide covers JavaScript's foundational concepts for developers familiar with other languages, explaining its seven primitive data types (Number, BigInt, String, Boolean, Symbol, Undefined, Null) and object types, then progressing through variables, operators, control structures, and functions. It emphasizes key distinctions like JavaScript's single numeric type treating all numbers as floating-point, its dynamic typing system, and how functions are first-class objects supporting closures and functional programming patterns. The guide also addresses asynchronous programming through callbacks, promises, and async/await, as well as the module system and the distinction between language-level features and runtime-provided APIs.

Permalink

Untitled (http://ha.ckers.org/xss.html)

This is a comprehensive technical reference guide for XSS filter evasion techniques, cataloging dozens of methods attackers can use to bypass security filters and inject malicious scripts into vulnerable web applications. The guide covers obfuscation strategies like HTML entity encoding, Unicode variations, character insertion techniques, and exploitation of browser parsing differences across Internet Explorer, Firefox, Opera, and Netscape. Rather than teaching attack execution or defense, it documents the underlying methodologies of how various encoding tricks, whitespace manipulation, and browser-specific quirks can defeat content filters—serving primarily as educational material for security researchers understanding XSS attack vectors.

Permalink