Skip to content

Instantly share code, notes, and snippets.

View rohan-krishna's full-sized avatar
👻
I may be slow to respond.

Rohan Krishna rohan-krishna

👻
I may be slow to respond.
View GitHub Profile
@rohan-krishna
rohan-krishna / cors-nginx.conf
Created July 24, 2020 21:57 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@rohan-krishna
rohan-krishna / create_tasks_table.php
Last active December 27, 2018 12:32
1375144f4718_tasks_migration_final
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
@rohan-krishna
rohan-krishna / create_tasks_table.php
Created December 27, 2018 11:38
1375144f4718_create_tasks
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
<?php
namespace app;
use app\Product;
use Carbon\Carbon;
class ProductFilter extends QueryFilter {
public function
@rohan-krishna
rohan-krishna / QueryFilter.php
Created April 27, 2018 04:36
Laravel 5 — How to build multiple Query Filters for Eloquent Model
<?php
namespace app;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Builder;
abstract class QueryFilter
{
protected $request;
protected $builder;
{
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"editor.fontFamily" : "Fira Code",
"editor.fontLigatures": true,
"emmet.triggerExpansionOnTab": true,
"php.suggest.basic": false,
"editor.autoIndent": true,
"emmet.includeLanguages" : {
@rohan-krishna
rohan-krishna / index.html
Created July 5, 2016 07:12
Vue.js Event Handling
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js Event Handing</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app">
<h1>Hello {{ message }}</h1>
@rohan-krishna
rohan-krishna / index.html
Created June 16, 2016 18:18
Another index.html continuation for Vue.js Intro
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app">
<h1>{{ message }}</h1>
@rohan-krishna
rohan-krishna / index.html
Created June 16, 2016 18:12
Continuation of Vue.js Intro
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
</head>
<body>
<div id="app"></div>
<script>