Skip to content

Instantly share code, notes, and snippets.

View itspriddle's full-sized avatar
🤘
clickity clack

Joshua Priddle itspriddle

🤘
clickity clack
View GitHub Profile
@benlk
benlk / 0-toc.md
Last active March 29, 2023 13:13
Collection of notes on WP_UnitTestCase
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
  • ?
@matthieuprat
matthieuprat / git-rsync
Last active August 18, 2021 05:01
Sync a local Git work tree with a remote one
#!/bin/sh
#
# Author: Matthieu Prat <matthieuprat@gmail.com>
# Date: 01/22/2015
#
# Sync a local work tree with a remote one.
# It's rsync on steroids within large Git repositories.
USAGE='<repository>'
LONG_USAGE='Sync a local work tree with a remote one.'
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.

How @extend Works

@akhleung is working on hcatlin/libsass and was wondering how @extend is implemented in the Ruby implementation of Sass. Rather than just tell him, I thought I'd write up a public document about it so anyone who's porting Sass or is just curious about how it works can see.

Note that this explanation is simplified in numerous ways. It's intended to explain the most complex parts of a basic correct @extend transformation, but it leaves out numerous details that will be important if full Sass compatibility

@ericboehs
ericboehs / gist:7125105
Created October 23, 2013 19:30
Poltergeist hack to silence CoreText performance notes from phantomjs
module Capybara::Poltergeist
class Client
private
def redirect_stdout(to)
prev = STDOUT.dup
prev.autoclose = false
$stdout = to
STDOUT.reopen(to)
prev = STDERR.dup
@bastibense
bastibense / README.md
Last active September 28, 2020 03:53
Fix blurry fonts on some external monitors when using MacBook Pro Retina

How to fix blurry fonts on some external monitors when using MacBook Pro Retina

It seems that graphcis and fonts look rather blurry on some monitors when hooked up to a MacBook Pro (Retina). This might fix the issue for you:

  1. Download patch-edid.rb from http://embdev.net/attachment/168316/patch-edid.rb

  2. Execute in Terminal (without the $):

    $ ruby patch-edid.rb

  3. Copy produced folder (example: DisplayVendorID-22f0) to /System/Library/Displays/Overrides (authorize if needed, if the folder exists, backup it before)

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@jzwinck
jzwinck / purge-directory.c
Created June 2, 2013 03:29
Inspired by http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html this program removes all regular files within a directory, using multiple processes to work faster. Timings from my system are in a comment below; feel free to leave your own. Easily create lots of empty files with "seq 10000 | xargs touch".
#include <dirent.h>
#include <stdio.h>
#include <unistd.h>
/* filter for regular files only */
static int dirent_select(const struct dirent* ent)
{
return ent->d_type == DT_REG;
}
@itspriddle
itspriddle / phpunit.rb
Created April 17, 2013 01:56
Install PHPUnit on OS X Mountain Lion using Homebrew
require 'formula'
class Phpunit < Formula
homepage 'http://www.phpunit.de/manual/current/en/index.html'
url 'http://pear.phpunit.de/get/phpunit.phar'
sha1 '7aaa26086ddf7cd0c517d7f52b74a53a7a1d7e29'
version 'HEAD'
def install
bin.install "phpunit.phar" => "phpunit"