Skip to content

Instantly share code, notes, and snippets.

View shivasurya's full-sized avatar

Shivasurya shivasurya

View GitHub Profile
@shivasurya
shivasurya / index.php
Created May 11, 2014 02:04
i-visionblog.com loginv1.0 index.php file
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/validator/css/bootstrapValidator.min.css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="css/validator/js/bootstrapValidator.min.js"></script>
<script>
$(document).ready(function() {
$('#attributeForm').bootstrapValidator();
<?php
header('Content-Type: application/json');
if($_POST)
{
if($_POST['email'])
{
$incominglist = $_POST['email'];
$full=array();
$con=mysqli_connect("localhost","root","shiva1995","invite");
// Check connection
{
"name":"hello",
"main":"www/index.html",
"description": "demo app of node-webkit",
"version": "0.1.0",
"window": {
"title": "Hello World",
"icon": "link.png",
"toolbar": false,
"width": 800,
<!DOCTYPE html>
<html>
<head>
<!-- Latest compiled and minified CSS -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
var express = require('express')
, http = require('http')
, path = require('path');
var app = express();
app.configure(function(){
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
@shivasurya
shivasurya / script.js
Created August 7, 2014 16:10
This script.js is a third party plugin which is used to upload files via ajx with progress bar - generally using bootstrap
$(function() {
var showInfo = function(message) {
$('div.progress').hide();
$('strong.message').text(message);
$('div.alert').show();
};
$('input[type="submit"]').on('click', function(evt) {
evt.preventDefault();
// server.js
// set up ======================================================================
// get all the tools we need
var path = require('path');
var express = require('express');
var app = express();
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080
, ip = process.env.OPENSHIFT_NODEJS_IP || "127.0.0.1";
var mongoose = require('mongoose');
var mongoose = require('mongoose');
var userSchema = mongoose.Schema({
recent : {
film : String,
director : String,
musicdir :String,
rating :String,
genre :String,
thumbnail : String,
},
@shivasurya
shivasurya / model.js
Created August 28, 2014 16:32
Simple Schema for mongoose DB
var mongoose = require('mongoose');
var movie_api = mongoose.Schema({
movie : {
name : String,
year : String,
director : String,
genre : String,
@shivasurya
shivasurya / server.js
Created August 28, 2014 16:40
node js API
var http = require("http");
var express = require("express");
var bodyParser = require('body-parser');
var app = express();
var mongoose = require("mongoose");
var remote_db_url = require('./database.js');
mongoose.connect(remote_db_url.url);
var movie = require('./model.js');
app.use(bodyParser());