Skip to content

Instantly share code, notes, and snippets.

View brynbellomy's full-sized avatar

Bryn Bellomy brynbellomy

  • Texas, Republic of
View GitHub Profile
@brynbellomy
brynbellomy / regex-html-text-only
Created July 1, 2011 21:07
Regex search and replace text within an HTML document that is not part of a tag
/**
* the [^<i] at the end of the first capture prevents the regex from catching strings
* that are actually part of other strings or tags. Replace the 'i' with anything that
* shouldn't come before the text to be captured. Example: capture 'nSPEC' but not
* 'inspect' -- hence the 'i'.
*
* the [^™] in the third capture does similarly for what comes after the text to be captured.
*/
$input = preg_replace('/>(?P<before>[^<]*?[^<i])?(?P<theText>The text goes here)(?P<char>[^™])/i', ">$1<span class=\"nspec\">$2™</span>$3", $input);
@brynbellomy
brynbellomy / MERLIN.md
Created July 4, 2011 19:54
This is a Markdown sandbox.

merlin is an object-oriented, MVC framework for node.js and CouchDB. It's built on top of Express and Cradle. Its name comes from Drupal, under which the author has slaved for far too long.

Getting started

Firstly, you should understand Model-View-Control architecture in order to use merlin. If you don't yet, you might want to read up on it somewhere a little more verbose than here.

Now, before building out your classes, you'll need to load up merlin and whichever of his plugins you think you might need.

var merlin = require('merlin').initMerlin(

// global merlin settings come in the first argument

@brynbellomy
brynbellomy / async-example-for-jp
Created February 2, 2012 22:25
example of using async library to fetch 3 datasets, the third being dependent on the first two
var async = require('async')
async.parallel(
{
// one way of doing it
getPeople: harvest.getPeople,
// another way of doing it
getProjects: function(parallelCallback) {
harvest.getProjects(parallelCallback)
@brynbellomy
brynbellomy / .gitignore
Created August 7, 2012 18:32
xcode/cocoapods .gitignore
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
@brynbellomy
brynbellomy / EMHint-0.0.1.podspec
Created August 7, 2012 23:36
cocoapods podspec for EMHint
Pod::Spec.new do |s|
s.name = "EMHint"
s.version = "0.0.1"
s.source = { :git => "git://github.com/mcconkiee/EMHint.git", :commit => "cd55d33cda430771dd64b547669bbaafe9524cba" }
s.platform = :ios
s.source_files = "HintMakerExample/EMHint.{h,m}"
s.requires_arc = false
s.xcconfig = { "PUBLIC_HEADERS_FOLDER_PATH" => "include/$(TARGET_NAME)" }
Pod::Spec.new do |s|
s.name = "RNExpandingButtonBar"
s.version = "0.0.1"
s.source = { :git => "git://github.com/brynbellomy/RNExpandingButtonBar.git", :commit => "b891e396b298a8e75c625d4a87a1ad5ffbc3aa12" }
s.platform = :ios
s.source_files = "*.{h,m}"
s.requires_arc = true
s.xcconfig = { "PUBLIC_HEADERS_FOLDER_PATH" => "include/$(TARGET_NAME)" }
Pod::Spec.new do |s|
s.name = "CQMFloatingController"
s.version = "0.0.1"
s.source = { :git => "git://github.com/brynbellomy/CQMFloatingController.git", :commit => "79c345db261850830b0065e373bf4a842a7a5d0d" }
s.platform = :ios
s.source_files = "CQMFloatingController/Classes/*.{h,m}"
s.requires_arc = true
s.xcconfig = { "PUBLIC_HEADERS_FOLDER_PATH" => "include/$(TARGET_NAME)" }
@brynbellomy
brynbellomy / floatsign.sh
Created August 8, 2012 16:08 — forked from mediabounds/floatsign.sh
A small bash script to re-sign iOS applications.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
@brynbellomy
brynbellomy / GPUImage-edge-centauri.podspec
Created August 11, 2012 09:13
GPUImage-edge-centauri.podspec
# september 2012
Pod::Spec.new do |s|
s.name = 'GPUImage-edge-centauri'
s.version = '0.0.1'
s.license = 'BSD'
s.platform = :ios
s.summary = 'OpenGL ES 2-based image and real-time camera filters for iOS.'
s.homepage = 'https://github.com/BradLarson/GPUImage'
s.author = { 'Brad Larson' => 'contact@sunsetlakesoftware.com' }
@brynbellomy
brynbellomy / GPUImage-Brynstagram-0.0.1.podspec
Created August 11, 2012 09:30
GPUImage-Brynstagram-0.0.1.podspec
Pod::Spec.new do |s|
s.name = "GPUImage-Brynstagram"
s.version = "0.0.1"
s.platform = :ios
s.source_files = "./framework/Source/*.{h,m}"
s.requires_arc = true
s.prefix_header_contents = "#import <GPUImage/GPUImage.h>"
s.frameworks = "CoreMedia", "CoreVideo", "OpenGLES", "QuartzCore", "AVFoundation", "UIKit"
s.xcconfig = { "PUBLIC_HEADERS_FOLDER_PATH" => "include/$(TARGET_NAME)" }