Skip to content

Instantly share code, notes, and snippets.

View peterkoopman's full-sized avatar

Peter Koopman peterkoopman

View GitHub Profile
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active August 28, 2025 15:49
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@unclecheese
unclecheese / Page_Controller.php
Created October 28, 2017 22:17
SS ajax site search
<?php
class Page_Controller extends ContentController
{
public function init()
{
parent::init();
Requirements::javascript('framework/thirdparty/jquery/jquery.js');
Requirements::javascript('themes/simple/javascript/script.js');
}
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active September 16, 2025 04:15
npm vs yarn command translation cheat sheet
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #