This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = express.createServer(express.logger(), express.bodyParser(), function(req, res){ | |
switch (req.url) { | |
case '/': | |
res.write( | |
'<h1>ZIP Lookup</h1>'+ | |
'<form method="post" action="/lookup" enctype="multipart/form-data">'+ | |
'<fieldset>'+ | |
'<label for="zip">Zip: </label>'+ | |
'<input type="text" name="zip" id="zip"></input>'+ | |
'<input type="submit" value="Submit" />'+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import urllib2 as l2 | |
import lxml.html | |
import smtplib | |
from lxml.cssselect import CSSSelector | |
tappath='//h4[@class="monthly"]' | |
url = 'http://www.ironhillbrewery.com/media/monthly-releases.htm' | |
resp = l2.urlopen(url) | |
data = resp.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.host_name = "local" | |
config.vm.customize ["modifyvm", :id, "--memory", "2048"] | |
config.vm.box = "vagrant-centos-64" | |
config.vm.box_url = "http://stevekarsch.com/sites/default/files/vagrant-centos-64.box" | |
#config.ssh.forward_agent = true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vtx_common_update_7102() { | |
$module_list = array( | |
'maxlength', | |
'imagefield_focus', | |
); | |
module_enable($module_list); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.synced_folder "www", "/vagrant/www", :mount_options => ["dmode=777,fmode=777"] |
We collaborate a lot at Blink Reaction. Not just internally, but with client development teams, our partners and, of course, the Drupal community.
Recently, a co-worker asked a question in our developer chat about the value of coding standards. He clearly understood it, however, the client he was working with was committing code to the sites git repo that was not in line with the (Drupal coding standards)[https://drupal.org/coding-standards]
The question he was asking, to paraphrase, was "How do I sell this client on the value of coding standards?"
We went around a bit, and came up with the following four:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var delay = 3000; //Your delay in milliseconds | |
URL='http://www.ingfunds.com/globalperspectives/signin'; | |
setTimeout(function(){ window.location = URL; }, delay); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('input.capture_mailingAddress_postalCode').attr('maxlength', '25'); | |
$("input.capture_mailingAddress_postalCode").keypress(function(event) { | |
// Backspace, tab, enter, end, home, left, right | |
// We don't support the del key in Opera because del == . == 46. | |
var controlKeys = [8, 9, 13, 35, 36, 37, 39]; | |
// IE doesn't support indexOf | |
var isControlKey = controlKeys.join(",").match(new RegExp(event.which)); | |
// Some browsers just don't raise events for control keys. Easy. | |
// e.g. Safari backspace. | |
if (!event.which || // Control keys in most browsers. e.g. Firefox tab is 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/source/ve/edit-profile.js b/source/ve/edit-profile.js | |
index 89f6979..a98b30d 100644 | |
--- a/source/ve/edit-profile.js | |
+++ b/source/ve/edit-profile.js | |
@@ -170,7 +170,7 @@ if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e){"use strict";if | |
function postCodeValidation(name, value, validation) { | |
- return janrainPfizer.commonValidation(value, validation, /{%regexp_postcode%}/); | |
+ return janrainPfizer.commonValidation(value, validation, /^\d{25}$/); |
OlderNewer