Skip to content

Instantly share code, notes, and snippets.

View BastinRobin's full-sized avatar
🔬
Trying Odd's on daily basis ;)

Bastin Robin BastinRobin

🔬
Trying Odd's on daily basis ;)
View GitHub Profile
@BastinRobin
BastinRobin / vue-laravel
Created September 25, 2018 01:47
Vuejs Image Upload Via Laravel
<input type="file" @change="image_changed">
// Vuejs
===========
const app = new Vue({
el: '#app',
@BastinRobin
BastinRobin / edit.php
Created September 22, 2018 04:33
Edit
// Controller Code Section
public function edit($id) {
$package = Package::find($id);
return view('edit.blade.php', ['[package' => $package]);
}
// URL Section
@BastinRobin
BastinRobin / index.php
Created August 28, 2018 17:43
Vue-todo List
<!DOCTYPE html>
<html>
<head>
<title>Todo List</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>
</head>
<style type="text/css">
.preview {
padding: 5px;
border: 1px solid #8BC34A;
@BastinRobin
BastinRobin / API.md
Last active July 17, 2018 08:04
Authentication API

API Requirement:

Login and Return Subjects

URL: /api/faculty/login

METHOD: POST

Request Payload:

@BastinRobin
BastinRobin / path
Created June 22, 2018 13:36
MySQL Mamp
export PATH=/Applications/MAMP/Library/bin:$PATH
export DYLD_LIBRARY_PATH=/Applications/MAMP/Library/lib/mysql
@BastinRobin
BastinRobin / a.md
Created June 15, 2018 16:08 — forked from danharper/a.md
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.

In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.

@BastinRobin
BastinRobin / run.py
Last active May 23, 2018 15:35
Execution file
import sys
import time
def print_label(name, age, course, email, phone):
filename = name+'_'+course+'_'+str(time.time())
dir_name = "results";
filename = dir_name+'/'+filename
f= open(filename,"w+")
@BastinRobin
BastinRobin / functions.php
Created May 7, 2018 08:00
Check Organization Email
<?php
// Write a php function which should behave like the following
/**
* For eg:
* is_email_official('info@hashresearch.com', 'http://hashresearch.com');
* >> True
*
* is_email_official('info@gmail.com', 'http://hashresearch.com');
* >> False
@BastinRobin
BastinRobin / laravelAssignment.md
Created March 27, 2018 08:39
Laravel Assignment

Laravel Assignment

Create the following routes, models, controllers

Model

People (schema)

  • first_name - string
  • last_name - string
@BastinRobin
BastinRobin / Assignment.md
Last active March 19, 2018 05:08
AIMS Fullstack Edition-4

Laravel Fullstack App Development:

Create a laravel application using composer and build the following requirments. You app should contain minimum three pages as follows. All UI components should be written using twitter bootstrap or any other similar frameworks of your choice, but not pure html.

Routes with html return:

  • / - Return a html page which is the homepage
  • /about - Return a html page which is about us page for the given url
  • /contact - Return a html page which is a contact us page for the given url and the page should have a form containing name, email, message, submit button.