Skip to content

Instantly share code, notes, and snippets.

View ptmaroct's full-sized avatar
🎯
Focusing

Anuj Sharma ptmaroct

🎯
Focusing
View GitHub Profile
@ptmaroct
ptmaroct / answers.rb
Created September 28, 2018 07:40
Answers endpoint
def answers
account = Account.find_by_subdomain(request.headers[:subdomain])
if account.present?
Apartment::Tenant.switch!(request.headers[:subdomain])
# strore params in variables
question_id = params[:question][:id]
answer_ids = params[:question].has_key?(:answers) ? params[:question][:answers] : nil
answer_text = params[:question].has_key?(:answerText) ? params[:question][:answerText] : nil
<?php
$name = $_POST['Name'];
$email = $_POST['Email'];
$mobile = $_POST['Mobile'];
$Departure=$_POST['Ddate'];
$return=$_POST['Rdate'];
$Destination=$_POST['D'];
$subject = "New booking recieved from $email";
$message = "
<?php
$email = $_POST['email'];
$location = $_POST['location'];
$message = $_POST['message'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$subjectmail = $_POST['subject'];
[{
"key": "AP",
"name": "Andhra Pradesh",
"capital": "Hyderabad"
}, {
"key": "AR",
"name": "Arunachal Pradesh",
"capital": "Itanagar"
}, {
"key": "AS",
<template>
<q-layout>
<div slot="header" class="toolbar primary">
<q-toolbar-title :padding="1">
Incredible India
</q-toolbar-title>
<button @click="$router.push('near')"><i>explore</i></button>
<button @click="$refs.search.open()">
<i>search</i>
</button>
<template>
<q-layout>
<!-- <q-drawer ref="drawer">
<div class="list platform-delimiter">
<div class="list-header">
<img src="../assets/mountains.jpg" width="100%">
</div>
<q-drawer-link icon="person_pin_circle" to="/account">Near Me</q-drawer-link>
<q-drawer-link icon="map" to="/alarms">Places</q-drawer-link>
<q-drawer-link icon="supervisor_account" to="/alarms">Guides</q-drawer-link>
@ptmaroct
ptmaroct / index.html
Last active April 1, 2017 08:07
Vue JS starter template
<!DOCTYPE html>
<html>
<head>
<title>Vue JS template</title>
<!-- Load Vue JS library -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.6/vue.min.js"></script>
</head>
<body>
<!-- Our Vue JS app, vue js will be functional inside this div only. -->
<div id="app">
<form action="test.php" method="POST">
Name:<input type="text" name="name"><br/>
Email Id:<input type="email" name="email"> <br/>
Phone Number:<input type="number" name="phone"> <br/>
<input type="submit" value="Submit">
</form>
<?php
echo "abcd"
@ptmaroct
ptmaroct / 0_reuse_code.js
Created December 20, 2016 04:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console