Skip to content

Instantly share code, notes, and snippets.

View thirumurthy's full-sized avatar

Thirumurthy thirumurthy

View GitHub Profile
@thirumurthy
thirumurthy / SailsGeneratePage.sh
Created August 19, 2018 04:08
To generate pages using sails framework
sails generate page foldername/functionname
@thirumurthy
thirumurthy / functionname.js
Created August 19, 2018 04:41
Sails common API function
// you can refer https://sailsjs.com/documentation/reference/waterline-orm/datastores/send-native-query
// Build our SQL query template.
var SPNAME_CALL_SQL = `call sp_spname($1,$2)`;
// Send it to the database.
var rawResult = await sails.sendNativeQuery(SPNAME_CALL_SQL, [ 'dog', 'cat' ]);
return exits.success();
@thirumurthy
thirumurthy / ajax-form.ejs
Last active September 10, 2018 14:43
Sails framework v1.0 Ajax form post method ajax-form
<div class="container">
<ajax-form action="cloudsetupactionname" :syncing.sync="syncing" :cloud-error.sync="cloudError" @submitted="submittedForm" :handle-parsing="handleParsingForm">
<!-- write other code here -->
<p class="text-danger" v-if="cloudError==='error1'"><small>error1.</small></p>
<p class="text-danger" v-else-if="cloudError==='error2'"><small>error2.</small></p>
<ajax-button type="submit" :syncing="syncing" class="btn-dark btn-lg btn-block">Submit</ajax-button>
@thirumurthy
thirumurthy / sails_jsfile.js
Last active September 10, 2018 14:42
It is a example sails framework javascript file for ajax-form post
data: {
// Form data
formData: { /* … */ },
// For tracking client-side validation errors in our form.
// > Has property set to `true` for each invalid property in `formData`.
formErrors: { /* … */ },
// Syncing / loading state
syncing: false,
var fonts = {
Roboto: {
normal: 'fonts/Roboto-Regular.ttf',
bold: 'fonts/Roboto-Medium.ttf',
italics: 'fonts/Roboto-Italic.ttf',
bolditalics: 'fonts/Roboto-MediumItalic.ttf'
}
};
var PdfPrinter = require('pdfmake');
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ