Skip to content

Instantly share code, notes, and snippets.

Eric Robitaille erobit

Block or report user

Report or block erobit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View errors
Error: permission_denied: Client doesn't have permission to access the desired data.
destroy called for FirebaseArray: https://MYURL.firebaseio.com/contacts
Error: Cannot call $add method on a destroyed $firebaseArray object
@erobit
erobit / incident.tmpl
Last active Aug 29, 2015
Incident manager concept
View incident.tmpl
<tr id="incident_new" class="newi">
<td>
<span class="display-mode" style="display:none;"></span>
<input type="text" name="incident" class="edit-mode form-control" />
</td>
<td>
<span class="display-mode" style="display:none;"></span>
<select name="severity" class="edit-mode form-control">
{{#severity}}
<option value="{{value}}">{{text}}</option>
@erobit
erobit / scanner.js
Last active Aug 29, 2015
Input field scanner - to detect when input is entered extremely fast (i.e. by a scanner and not a human) and execute a callback method
View scanner.js
function Scanner(id, opts, cb) {
this.robot = false;
this.count=0;
this.tick = 0;
this.total = 0;
this.avg = 0;
this.timer = null;
this.callback = arguments.length == 3 ? cb : opts;
this.opts = arguments.length == 2 ? {} : opts;
View gist:57bb3c2a617f26cd5e6e
$(document).ready(function(){
function Scanner(el) {
this.robot = false;
this.count = 0;
this.tick = 0;
this.total = 0;
this.avg = 0;
this.scanThreshold = 10;
this.minChars = 25;
@erobit
erobit / reverse_id publisher fix
Created Dec 6, 2010
When the new public page is created (using the copy_page method) - the reverse_id was being set to None
View reverse_id publisher fix
from cms.exceptions import NoHomeFound
from cms.models.managers import PageManager, PagePermissionsPermissionManager
from cms.models.placeholdermodel import Placeholder
from cms.utils.helpers import reversion_register
from cms.utils.i18n import get_fallback_languages
from cms.utils.page import get_available_slug, check_title_slugs
from cms.utils.urlutils import urljoin
from datetime import datetime
from django.conf import settings
from django.contrib.sites.models import Site
You can’t perform that action at this time.