Skip to content

Instantly share code, notes, and snippets.

View sohelamin's full-sized avatar
🎯
Focusing

Sohel Amin sohelamin

🎯
Focusing
View GitHub Profile
@sohelamin
sohelamin / xampp.md
Created January 11, 2016 05:48
MySQL Symbolic for MAC Xampp
sudo mkdir /var/mysql
cd /var/mysql
sudo ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock
@sohelamin
sohelamin / crud-generator.md
Created January 25, 2016 04:41
Laravel Crud Generator

Laravel 5 CRUD Generator

Laravel CRUD Generator

Requirements

Laravel >=5.1
PHP >= 5.5.9

Installation

  1. Run
@sohelamin
sohelamin / valet.md
Last active May 6, 2016 17:41
valet

Valet Installation Guide

A PHP Development Environment by Laravel

  1. brew update
  2. brew install php70
  3. brew install mariadb
  4. composer global require laravel/valet
  5. echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bash_profile
  6. source ~/.bash_profile
@sohelamin
sohelamin / svn.md
Created May 28, 2016 05:31
SVN Commands
svn checkout <REPOSITORY-URL>
svn update
svn add --force ./*
svn commit -m '<MESSAGE>'
@sohelamin
sohelamin / wifi-password.md
Created July 19, 2016 01:16
Wifi Password

Windows

netsh wlan show profile name=<WIFI-NAME> key=clear | findstr Key

Linux

sudo cat /etc/NetworkManager/system-connections/<WIFI-NAME> | grep psk=
@sohelamin
sohelamin / timezone.md
Last active July 22, 2016 05:53
DateTime

Timezone name from an offset

$tz_offset = 6;

$tz_name = timezone_name_from_abbr(null, $tz_offset * 3600, true);

var_dump($tz_name);
@sohelamin
sohelamin / Vagrantfile
Created October 11, 2016 14:27
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@sohelamin
sohelamin / velement.html
Created October 16, 2016 14:47
Dynamically generate html element by Vue.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Vue.js Simple Example</title>
</head>
<style>
body {
font : 100% Helvetica, sans-serif;
color: #ecf0f1;
@sohelamin
sohelamin / LoginController.php
Created November 1, 2016 16:52
Laravel Custom Authentication
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class LoginController extends Controller
@sohelamin
sohelamin / Crudify.vue
Last active December 31, 2016 07:01
Vue Crudify Component
<script>
export default {
props: ['label', 'url', 'fields', 'columns'],
data() {
return {
defaultForm: {},
form: {
editMode: false
},
errors: [],