Skip to content

Instantly share code, notes, and snippets.

View chaitu87's full-sized avatar

Chaithanya Padi chaitu87

View GitHub Profile
@chaitu87
chaitu87 / session.aspx
Created July 13, 2016 14:41
Sample NET Code
<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="session.aspx.cs" Inherits="VedioCalling._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<link href='https://fonts.googleapis.com/css?family=Josefin+Sans&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<%--<p>
<a href="javascript:void(0)" id="call-btn">Call</a>
<a href="javascript:void(0)" id="end-btn">End</a>
</p>--%>
<style>
li {
@chaitu87
chaitu87 / emailtemplate.html
Last active July 6, 2016 12:28
use this for email template
<style type="text/css">
*,.collapse{padding:0}.btn,.social .soc-btn{text-align:center;font-weight:700}.btn,ul.sidebar li a{text-decoration:none;cursor:pointer}.container,table.footer-wrap{clear:both!important}*{margin:0;font-family:"Helvetica Neue",Helvetica,Helvetica,Arial,sans-serif}img{max-width:100%}body{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;width:100%!important;height:100%}.content table,table.body-wrap,table.footer-wrap,table.head-wrap{width:100%}a{color:#2BA6CB}.btn{color:#FFF;background-color:#666;padding:10px 16px;margin-right:10px;display:inline-block}p.callout{padding:15px;background-color:#ECF8FF;margin-bottom:15px}.callout a{font-weight:700;color:#2BA6CB}table.social{background-color:#ebebeb}.social .soc-btn{padding:3px 7px;font-size:12px;margin-bottom:10px;text-decoration:none;color:#FFF;display:block}a.fb{background-color:#3B5998!important}a.tw{background-color:#1daced!important}a.gp{background-color:#DB4A39!important}a.ms{background-color:#000!important}.sidebar .so
$(function() {
$('#datepick').datetimepicker({
inline: true,
format: 'DD/MM/YYYY',
minDate: moment().format()
}).on('dp.change', function(e) {
// Clicking the date
console.log(e.date);
var cdate = moment(e.date).format('Do MMM YYYY');
console.log(cdate);
#datepick{
.day{
margin: 15px 10px;
border-radius: 0;
// background-color: $yellow;
}
.active{
background-color: $purple;
}
<div class="calendar">
<div class="row">
<div class="col-md-4">
<div id="datepick"></div>
</div>
<div class="col-md-3">
<div class="well">
<h5>Available Slots <span id="selectedDate">For Today</span></h5>
<br>
<ul class="nav nav-pills nav-stacked">
$.ajax({
url: 'http://demo6.alightsoftwares.com/account/AskQuestion',
data: {
name: questionname,
email: questionemail,
phonenumber: questionmobile,
question: thequestion
},
type: "POST",
dataType: "json"
@chaitu87
chaitu87 / sample.js
Created September 28, 2015 14:51
a secure call
var express = require('express'),
router = express.Router(),
request = require('request'),
jwt = require('jsonwebtoken');
module.exports = function(app) {
app.use('/', router);
};
router.get('/securecall',function(req,res,next){
@chaitu87
chaitu87 / fixed.js
Last active September 9, 2015 10:13
Fixed Directive
.directive('setClassWhenAtTop', function($window) {
var $win = angular.element($window); // wrap window object as jQuery object
return {
restrict: 'A',
link: function(scope, element, attrs) {
var topClass = attrs.setClassWhenAtTop, // get CSS class from directive's attribute value
offsetTop = element.offset().top; // get element's offset top relative to document
$win.on('scroll', function(e) {
@chaitu87
chaitu87 / .htaccess
Last active August 29, 2015 14:23 — forked from heroheman/.htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@chaitu87
chaitu87 / yes.sh
Last active September 18, 2015 08:14
Node and Passenger Setup on EC2
# Install Nodejs & NPM
curl -sL https://deb.nodesource.com/setup_0.12 | bash -
sudo apt-get install nodejs
# For some plugin you may need
sudo apt-get install build-essential