Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>VanillaJS • TodoMVC</title>
<style>
html,
body {
// ==UserScript==
// @name Harvest Keyboard Shortcuts
// @namespace https://gist.github.com/bendavis78/32418388243d846344f1
// @version 0.1
// @description enter something useful
// @author Ben Davis
// @match https://*.harvestapp.com/time/day/*
// @grant none
// ==/UserScript==
@bendavis78
bendavis78 / check-unregistered-custom-elements.js
Last active August 29, 2015 14:21
Check for unregistered custom elements
// ==UserScript==
// @name Check for unregistered custom elements
// @namespace https://gist.github.com/bendavis78/70a15fb6c1b0d60aca9f
// @version 0.1
// @description Checks for unregistered custom HTML elements
// @author Ben Davis
// @match http://*/*
// @grant none
// ==/UserScript==
/*
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
diff --git a/leadmachine/admin/sites/listadmin.py b/leadmachine/admin/sites/listadmin.py
index cae72e5..435a403 100644
--- a/leadmachine/admin/sites/listadmin.py
+++ b/leadmachine/admin/sites/listadmin.py
@@ -488,7 +488,8 @@ class SourceListAdmin(LeadMachineModelAdmin):
for f in ['first_name', 'last_name', 'middle_name', 'title', 'suffix', 'external_uid']:
val = getattr(item, f, getattr(contact, f))
if f in ('first_name', 'last_name', 'middle_name'):
- val = val.lower().title()
+ if val in (val.upper(), val.lower()):
# Log switchboard stuff to logfile
LOGGING['loggers']['switchboard']['handlers'] = ['logfile']
LOGGING['loggers']['switchboard']['level'] = 'WARNING'
LOGGING['handlers']['logfile']['filename'] = '/var/log/apache2/capstone.savidworks.com/switchboard.log'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(asctime)s - %(name)s - %(levelname)s: %(message)s',
},
'simple': {
'format': '%(levelname)s: %(message)s',
}
diff --git a/leadmachine/admin/sites/listadmin.py b/leadmachine/admin/sites/listadmin.py
index cae72e5..435a403 100644
--- a/leadmachine/admin/sites/listadmin.py
+++ b/leadmachine/admin/sites/listadmin.py
@@ -488,7 +488,8 @@ class SourceListAdmin(LeadMachineModelAdmin):
for f in ['first_name', 'last_name', 'middle_name', 'title', 'suffix', 'external_uid']:
val = getattr(item, f, getattr(contact, f))
if f in ('first_name', 'last_name', 'middle_name'):
- val = val.lower().title()
+ if val in (val.upper(), val.lower()):
diff --git a/leadmachine/admin/sites/listadmin.py b/leadmachine/admin/sites/listadmin.py
index cae72e5..435a403 100644
--- a/leadmachine/admin/sites/listadmin.py
+++ b/leadmachine/admin/sites/listadmin.py
@@ -488,7 +488,8 @@ class SourceListAdmin(LeadMachineModelAdmin):
for f in ['first_name', 'last_name', 'middle_name', 'title', 'suffix', 'external_uid']:
val = getattr(item, f, getattr(contact, f))
if f in ('first_name', 'last_name', 'middle_name'):
- val = val.lower().title()
+ if val in (val.upper(), val.lower()):
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
// The base Class implementation (does nothing)
this.Class = function(){};
// Create a new Class that inherits from this class
Class.extend = function(prop) {
var _super = this.prototype;
// Instantiate a base class (but only create the instance,