Skip to content

Instantly share code, notes, and snippets.

View rnjailamba's full-sized avatar
🎯
Focusing

Rnjai Lamba rnjailamba

🎯
Focusing
View GitHub Profile
@rnjailamba
rnjailamba / bootstrapBoilerplate.html
Created December 25, 2015 06:34
Basic Boiler Plate Code For Twitter Bootstrap
<style>
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
@rnjailamba
rnjailamba / gist:40dcf325d8ebd2719cc4
Created January 5, 2016 08:53
Basic Boiler Plate Form - Dropdown , Input text , Multiple Select and Submit Button - [http://tinypic.com/r/25u4lrm/9]
<style type="text/css">
h2{
text-align: center;
}
.filters{
background-color: white;
height: 500px;
width: 1000px;
}
@rnjailamba
rnjailamba / dropzone.html
Last active February 3, 2020 02:47
Dropzone js with Bootstrap Code
<!DOCTYPE html>
<html>
<head>
<meta charset=="utf-8">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.2.0/min/dropzone.min.js"></script> <!-- js for the add files area /-->i
<script>
var Dropzone = require("enyo-dropzone");
Dropzone.autoDiscover = false;
@rnjailamba
rnjailamba / gist:d49888d68bed5c5b172c
Created February 7, 2016 07:01
Sir Trevor JS + Node.js
1.Install Bower
npm install -g bower
2.Add a bower.json file parallel to app.js/server.js file with following contents -
{
"name": "your-project",
"dependencies": {
"sir-trevor-js": "0.4.3"
},
"resolutions": {
"jquery": "~1.9.1"
@rnjailamba
rnjailamba / gist:7d21cc8fbcc7595c8f66
Last active February 15, 2016 06:38
Form Params + Postman
@POST
@Path("sendappnotification")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public static String sendSMS(@FormParam("order_id") String order_id,
@FormParam("template") String template,
@FormParam("appNotifData") String notif_json) {
}
reference - http://stackoverflow.com/questions/27957649/resteasy-formparam-returns-always-null
reference - http://postimg.org/image/iwbrdbilz/
@rnjailamba
rnjailamba / html
Created February 18, 2016 07:50
Editing Create modal pop up from web page.
<li><a id='dialog_trigger_operations' data="/csportalNew/operations_view/<?php echo $order->order_id ?>" data-toggle="tooltipOperationsView" >View and edit Operation view</a> </li>
&lt;div id = 'dialog_operations'&gt;&lt;/div&gt;
&lt;script&gt;
  $(document).ready(function(){
      $("#dialog_operations").dialog({
@rnjailamba
rnjailamba / appConfig.js
Created March 1, 2016 04:09
Nodejs Expressjs Config file Development and Production - Service URL Mapping
module.exports = function(){
var userServiceURL;
var blogServiceURL;
var contentServiceURL;
switch(process.env.NODE_ENV || 'development'){// other option is export NODE_ENV=development in console
case 'development':
userServiceURL = "http://localhost:9000/userService/";
break;
@rnjailamba
rnjailamba / readAjaxDataFromRouter.js
Created March 1, 2016 05:33
Node JS - Send AJAX POST data and read from Node/Express js router
// SEND OTP
// ==============================================
router.post('/sendOTP',function(req, res){
console.log('body: ' + JSON.stringify(req.body));
}
@rnjailamba
rnjailamba / keystone_PDF_AWS.txt
Last active May 2, 2018 23:33
Keystone js + PDF upload to AWS
In your model simply add a field for the pdf -
Admission.add({
name: { type: String, required: true },
state: { type: Types.Select, options: 'draft, published, archived', default: 'published', index: true },
author: { type: Types.Relationship, ref: 'User', index: true },
publishedDate: { type: Types.Date, index: true },
pdf: { type: Types.S3File },
content: {
brief: { type: Types.Html, wysiwyg: true, height: 150 },
@rnjailamba
rnjailamba / solr.txt
Last active June 14, 2023 16:51
Remove managed-schema and get schema.xml in SOLR core [ Version 5.5.0 ]
Lets say solr is located at /usr/local/solr-5.5.0 .
1. bin/solr start
2. bin/solr create -c test
3. location of new core is here /usr/local/solr-5.5.0/server/solr/test
4. location of solrconfig is here /usr/local/solr-5.5.0/server/solr/test/solrconfig.xml
5. Open solrconfig.xml -
You will find this
<schemaFactory class="ManagedIndexSchemaFactory">
<bool name="mutable">true</bool>
<str name="managedSchemaResourceName">managed-schema</str>