Skip to content

Instantly share code, notes, and snippets.

RemeJuan / form_validation.js
Created August 26, 2014 08:05
Very basic form validation for jQeury, only useful if you do not want to use wbshims to pollyfill older browsers and simply nee to validate if a field has a value.
View form_validation.js
//Basic custom form validation
$('#formSave').on('click', function() {
if($(this).val() === '') {
$(this).addClass('required').val('This field is required');
if (cfarray.length === 0) {
$('#selectedResults').addClass('required').text('This field is required')
RemeJuan / HTML5_Blank.html
Last active August 29, 2015 14:05
HTML5 Blank HTML template
View HTML5_Blank.html
<!doctype html>
<meta charset="utf-8">
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Untitled Document</title>
RemeJuan / contents.css
Last active August 29, 2015 14:05
Default CSS File
View contents.css
RemeJuan / getQueryVAriables.js
Created September 15, 2014 13:00
Get query variables from url string with javascript
View getQueryVAriables.js
//Get query variables from URL string
function getQueryVariable(variable) {
var query =;
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("="); if(pair[0] == variable) {
return pair[1];
RemeJuan / ajax_search.js
Last active August 29, 2015 14:06
AJAX search query returning JSON data from DB to populate UL
View ajax_search.js
//Function to handle database search and process results
function getCustomers(searchQuery) {
type: 'POST',
url: '/com/cfcs/SearchServices.cfc?method=searchCustomerByName&customerName=' + searchQuery + '&returnFormat=json',
datatype: 'json',
cache: false,
success: function(response)
var searchResults = response.DATA,
RemeJuan / browser_test.js
Last active August 29, 2015 14:07
Detect browser version using HTTP headers, add a class to the body tag as well as set a variable.
View browser_test.js
//Check browser version and apply classes to body where applicable
var body = document.getElementsByTagName('body')[0],
userAgent = navigator.appVersion.toLowerCase();
if (userAgent.indexOf("msie 8.") !== -1)
browserName = 'ie';
RemeJuan / wercker.yml
Created March 30, 2016 12:50
Complete docker sample file for automated deployment to digital ocean.
View wercker.yml
box: node
- npm-install
- script:
name: install nodemon
RemeJuan / style.css
Created April 4, 2016 06:31
Better responsive table
View style.css
@media only screen and (max-width: 800px) {
.enhanced-responsive-table {
table, thead, tbody, th, td, tr {
display: block;
thead tr {
position: absolute;
top: -9999px;
left: -9999px;

Keybase proof

I hereby claim:

  • I am RemeJuan on github.
  • I am remejuan ( on keybase.
  • I have a public key whose fingerprint is 9FE2 6A96 E3E3 34A0 E323 8ED6 A932 9EF4 E20C E8E9

To claim this, I am signing this object:

RemeJuan / main.html
Last active November 15, 2016 06:08
Aurelia: First Impressions #1
View main.html
<!--Importing a component into a template-->
<require from="component/component"></require>
<require from="other-component/other-component.html"></require>
<!--Displaying/rendering the imported component.-->
<other-component data-bind="stuff"></other-component>