Skip to content

Instantly share code, notes, and snippets.

View shrawanx's full-sized avatar
🏠
Working from home

Shrawan P. shrawanx

🏠
Working from home
View GitHub Profile
@shrawanx
shrawanx / demo.sql
Created May 18, 2018 02:45
SQL Trigger
create table student(
rollno number(5),
nam varchar(50));
create table audittrail(
rollldata number(5),
namedata varchar(50),
operationname varchar(60),
@shrawanx
shrawanx / views.py
Created April 4, 2018 09:10
Dynamically rendering custom templates tags from view to template in django
def home(request):
from django.template import Context
from django.template import Template
from django.template.loader import render_to_string
x = '{% load custom_tags %} {% user_count %}'
prepare = {'tags':x}
x = render_to_string('home.html',context=prepare,request=request)
template = Template(x)
context = Context({})
y = template.render(context)
@shrawanx
shrawanx / mongo_u.txt
Created March 18, 2017 13:37
Mongodb basic usuage
service mongod start
service mongod stop
service mongod restart
show dbs --->will show all database
use [database name]---->will use the db
db.dropDatabase() ---> will drop database of selected database or else test db is deleted
<div class="row" style="background-color:#006699;"><br>
<div class="col-sm-6"></div>
<div class="col-sm-3">
<div class="widget">
<form class="form-search">
<input class="form-control" type="text" placeholder="Search..">
</form>
</div>
</div>
<div class="col-sm-1" ><ul class="social-network">
#include<iostream>
#include<conio.h>
using namespace std;
void tower(int, char[], char[], char[]);
void main()
{
int N;
@shrawanx
shrawanx / 0_reuse_code.js
Created April 29, 2016 14:49
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