Skip to content

Instantly share code, notes, and snippets.

View santhosh-chinnasamy's full-sized avatar

Santhosh C santhosh-chinnasamy

View GitHub Profile
#| index.html
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<input type="text" v-on:input="changeTitle">
<p>{{ title }} {{ name }}</p>
</div>
@santhosh-chinnasamy
santhosh-chinnasamy / php-db-connection.txt
Created August 28, 2018 16:39
php db connection and session
<!-- index.php-->
<!--========================================================================================================================-->
<!--========================================================================================================================-->
<!--========================================================================================================================-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@santhosh-chinnasamy
santhosh-chinnasamy / basci_form.php
Last active August 29, 2018 16:27
basic form in php
<?php echo $_POST["name"];
echo $_POST["email"]; ?> //also use $_GET[] to access form details
<html>
<body>
<form action="this.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
<!DOCTYPE HTML>
<html>
<head>
<style>
.error {color: #FF0000;}
</style>
</head>
<body>
<?php
display: flex;
flex: flex-grow, flex-shrink, flex-basis;
flex-grow: <integer>;
/*default 0 */
/* how much item will grow relative to the rest of the items */
flex-shrink: <number>;
/* default 1 */
/* how much item will grow relative to the rest of the items */
display: grid;
grid-template-columns: n n n;
grid-template-rows: n n n;
grid-template-columns: repeat( auto-fill || <number> , minmax(60px, 1fr));
/* fr: sets the column or row to a fraction of the available space */
grid-column-gap: ;
grid-row-gap: ;
grid-gap: grid-column-gap, grid-row-gap;
function anagram(s1,s2){
var x= s1.split('').sort().join('');
var y = s2.split('').sort().join('');
if(x==y){
console.log(x,y);
}
else{
console.log("nope");
}
@santhosh-chinnasamy
santhosh-chinnasamy / vagrant.md
Last active December 6, 2018 08:25
vagrant/vbox related commands

list all Virtual machine

vboxmanage list vms
@santhosh-chinnasamy
santhosh-chinnasamy / output.css
Last active January 1, 2019 05:34
samplse css file
.sample{
background-color: #3bbfce;
}
@santhosh-chinnasamy
santhosh-chinnasamy / sample.scss
Last active January 1, 2019 05:37
sample scss file
$blue: #3bbfce;
.sample{
background-color: $blue;
}