Skip to content

Instantly share code, notes, and snippets.

View jayproulx's full-sized avatar
🎯
Focusing

Jay Proulx jayproulx

🎯
Focusing
View GitHub Profile
@jayproulx
jayproulx / simpleorderstatus.js
Last active August 29, 2015 14:15
Sinelabs Simple Order Status
re = /^([\w]+)([\+\-\.\w]*)@([\-\.\w]+)(\.[\w]{2,17}){1,2}$/;
@jayproulx
jayproulx / aircanada_11112013.js
Last active August 29, 2015 14:17
Air Canada Email Validation
// http://help-aircanada.com/aircanada-help/js/aircanada_11112013.js
//This function is used to validate email address : Returns true if email is valid
function isEmailValid(emailToValidate){
//var regex1=/^([_A-Za-z0-9-/&]+(\.[_A-Za-z0-9-/&]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.(([A-Za-z]{2,3})|(aero|coop|info|museum)))?$/
//return regex1.test(emailToValidate);
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,17})+$/.test(emailToValidate))
{
return (true);
Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
for(int i = 0; i < 4; i++) {
pinMode(leds[i], OUTPUT);
}