Skip to content

Instantly share code, notes, and snippets.

View joelpurra's full-sized avatar
🗺️
Working remotely

Joel Purra joelpurra

🗺️
Working remotely
View GitHub Profile
@joelpurra
joelpurra / jquery.validate.unobtrusive.dynamic.js
Created April 11, 2012 15:19
$.validator.unobtrusive.parseDynamicContent by XHalent, modified to keep a reference to the jQuery selector/context object
/// <reference path="../jquery-1.7.js" />
/// <reference path="../jquery.validate.js" />
/// <reference path="../jquery.validate.unobtrusive.js" />
// Originally by XHalent, @xhalent
// http://xhalent.wordpress.com/
// http://xhalent.wordpress.com/2011/01/24/applying-unobtrusive-validation-to-dynamic-content/
// Modified by Joel Purra
// http://joelpurra.com/
@joelpurra
joelpurra / git-create.bash
Created October 6, 2016 16:48
Create new empty remote git repository via ssh
#!/bin/bash
#
# create a new empty remote repository.
#
# Usage: git-create <remote-url>
#
if [ -z "$1" ]
then
echo "Usage: $0 <remote-url>"
echo
@joelpurra
joelpurra / InheritedClassModelBinder.cs
Created April 18, 2012 18:26
InheritedClassModelBinder: A ModelBinder for ASP.NET MVC3 that handles creating concrete class instances mapped to an abstract superclass. Based on code by Kelly.
namespace JoelPurra.Web.Binders
{
using System;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Web.Mvc;
using rDoing.Scraper.Web.Mvc.Controllers.ViewModels.Binder.Helpers;
/// <remarks>
/// Based on
@joelpurra
joelpurra / stonehenge.js
Created October 21, 2018 13:31
monolith was taken so heres the makings to stonehenge
((dev) => {
"use strict";
const fs = require('fs');
const path = require('path');
const express = require('express');
const log_color = {
clear: "\x1b[0m",
read: "\x1b[34m",
@joelpurra
joelpurra / mono-server4.service
Created October 8, 2016 13:13 — forked from virtualdreams/mono-server4.service
systemd mono-server4 unit script
[Unit]
Description=FastCGI mono server 4
After=network.target
[Service]
Environment=MONO_IOMAP=all
EnvironmentFile=
Type=simple
ExecStart=/usr/bin/fastcgi-mono-server4 /applications=*:/:/srv/www/mvc/ /socket=tcp:127.0.0.1:9000
User=www-data
@joelpurra
joelpurra / update_to_nan_v2.0.x.sh
Last active July 24, 2016 20:02 — forked from thlorenz/update_to_nan_v2.0.x.sh
Script to update Node.js addons to work with nan 2.0.x and thus with iojs v3.x/node v4/5/6 (gets you 99% there)
# Script has moved to https://github.com/joelpurra/getdns-developer-support/tree/master/src/getdns-node/nan-upgrade
open 'https://github.com/joelpurra/getdns-developer-support/tree/master/src/getdns-node/nan-upgrade'
@joelpurra
joelpurra / jquery.youtubin.js
Last active December 26, 2015 18:18
A patched version of jquery.youtubin.js that accepts https and youtu.be urls, and fixes a change to jQuery's .attr() http://jonraasch.com/blog/youtubin-jquery-plugin http://dev.jonraasch.com/youtubin/
/**
* jquery.youtubin.js
* Copyright (c) 2009 Jon Raasch (http://jonraasch.com/)
* Licensed under the Free BSD License (see http://dev.jonraasch.com/youtubin/docs#licensing)
*
* @author Jon Raasch
* @author Joel Purra <code@joelpurra.com>
*
* @projectDescription jQuery plugin to allow simple and unobtrusive embedding of youtube videos with a variety of options.
*
@joelpurra
joelpurra / pubsublogging.joelpurra.js
Created September 28, 2012 21:35
Overriding $.publish() to capture the event for logging purposes. For use with jQuery pub/sub plugin by Peter Higgins.
/*!
* @license PubSubLogging
* Copyright © 2012 Joel Purra <http://joelpurra.se/>
* Released under MIT, BSD and GPL license. Comply with at least one.
*
* Overriding $.publish() to capture the event for logging purposes.
*
* For use with jQuery pub/sub plugin by Peter Higgins (dante@dojotoolkit.org)
* http://higginsforpresident.net/
* https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js
@joelpurra
joelpurra / README.md
Last active October 6, 2015 16:57
A jQuery plugin to show and hide follow up questions in a form. The follow ups are specified through HTML5 [data-*] attributes.