Skip to content

Instantly share code, notes, and snippets.

View zeman's full-sized avatar

Mark Zeman zeman

View GitHub Profile
@ifduyue
ifduyue / beanstalkd.service
Last active March 1, 2023 11:36
Install beanstalkd on CentOS 7 / CentOS 8
[Unit]
Description=Beanstalkd is a simple, fast work queue
[Service]
User=nobody
Restart=always
RestartSec=500ms
ExecStart=/usr/local/bin/beanstalkd -b /var/lib/beanstalkd
LimitNOFILE=10240
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@tinabeans
tinabeans / template.html
Last active February 13, 2024 09:18
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active April 2, 2024 18:45
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@pmeenan
pmeenan / user-timing-rum.js
Last active January 18, 2024 23:46
Support routine for adding W3C user timing events to a site. Includes some basic polyfill support for browsers that don't support user timing or navigation timing (though the start time for non-navigation timing support could be improved with IE < 9 to use IE's custom start event).
// Support routines for automatically reporting user timing for common analytics platforms
// Currently supports Google Analytics, Boomerang and SOASTA mPulse
// In the case of boomerang, you will need to map the event names you want reported
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable:
// rumMapping = {'aft': 'custom0'};
(function() {
var wtt = function(n, t, b) {
t = Math.round(t);
if (t >= 0 && t < 3600000) {
// Google Analytics
@themattharris
themattharris / Flickr Cacher
Created July 4, 2009 10:56
Provides a local caching system for Flickr images to ensure they are viewable when clients have Flickr blocked.
<?php
/*
Flickr Caching Script for WordPress
Description: Provides a local caching system for Flickr images to ensure they
are viewable when clients have Flickr blocked.
Version: 1.0
Author: Matt Harris
Author URI: http://themattharris.com
License: MIT (http://www.opensource.org/licenses/mit-license.php)