Skip to content

Instantly share code, notes, and snippets.

View jmslbam's full-sized avatar
💭
Available for (WordPress) work

Jaime Martínez jmslbam

💭
Available for (WordPress) work
View GitHub Profile
@agnoster
agnoster / README.md
Last active May 10, 2025 17:44
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@mxmilkiib
mxmilkiib / wp-base-install.sh
Last active October 7, 2015 11:27
WP Base Install scratchpad old
#!/bin/bash
# this is a work in progress! NOT for production.
# requires wp-cli
# usage: wp-base-install
# or: ./wp-base-install.sh
# Bits of inspiration from https://gist.github.com/2853221
# to look at: http://www.servercobra.com/automated-wordpress-install-with-nginx-script/
@lancejpollard
lancejpollard / install.bash
Created June 27, 2012 18:21
Upgrade Node.js with Homebrew
$ brew upgrade node
==> Upgrading node
==> Downloading http://nodejs.org/dist/v0.8.0/node-v0.8.0.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/node/0.8.0 --without-npm
==> make install
==> Caveats
Homebrew has NOT installed npm. We recommend the following method of
installation:
curl http://npmjs.org/install.sh | sh
@richleland
richleland / comments.js
Created May 17, 2012 16:53
discovery specific comments config
$(function() {
// set up some references
var commentsDiv = $("#comments");
var commentsToggle = $("#comments-toggle");
if(commentsDiv.length && typeof commentsCategoryID !== "undefined" && typeof commentsStreamID !== "undefined") {
// comment counter
// docs at http://developers.gigya.com/020_Client_API/020_Methods/z_020_Comments/comments.getComments
gigya.comments.getComments({
categoryID: commentsCategoryID,
@helgatheviking
helgatheviking / custom-post-type-archive-menu-links.php
Created May 4, 2012 17:41
Adds Custom Post Type archives to the WordPress-powered menus
<?php
/*
Plugin Name: Custom Post Type Archive Menu Links
Plugin URI: http://codeseekah.com/2012/03/01/custom-post-type-archives-in-wordpress-menus-2/
Description: Easily Add Custom Post Type Archives to the Nav Menus
Version: 1.0
Author: soulseekah
Author URI: http://codeseekah.com
License: GPL2
@eikes
eikes / getElementsByClassName.polyfill.js
Created April 4, 2012 08:04
Polyfill for getElementsByClassName
// Add a getElementsByClassName function if the browser doesn't have one
// Limitation: only works with one class name
// Copyright: Eike Send http://eike.se/nd
// License: MIT License
if (!document.getElementsByClassName) {
document.getElementsByClassName = function(search) {
var d = document, elements, pattern, i, results = [];
if (d.querySelectorAll) { // IE8
return d.querySelectorAll("." + search);
@strangerstudios
strangerstudios / gist:2232405
Created March 29, 2012 01:56
Pay Per Post for WordPress with Paid Memberships Pro
<?php
/*
Limiting posts per user.
Enable the Paid Memberships Pro plugin and then add this code to your functions.php or as a stand alone plugin.
Be sure to read through this code carefully. Update each function to suit your needs.
This code has not been tested. Feel free to post issues in the comments.
*/
//increment post limit when checking out
function my_pmpro_after_checkout($user_id)
{
@luetkemj
luetkemj / wp-query-ref.php
Last active April 6, 2025 09:15
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@simi
simi / Gemfile
Created February 7, 2012 14:32
Refinery + Twitter Bootstrap WIP
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'