Skip to content

Instantly share code, notes, and snippets.

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

Abishek R Srikaanth abishekrsrikaanth

🏠
Working from home
View GitHub Profile
@abishekrsrikaanth
abishekrsrikaanth / setup-dev.sh
Created October 13, 2015 23:52
Install homebrew, nginx, mysql, php55, and composer on Mac OS X
#!/bin/bash
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php

Installation

Installing Supervisor on OS X is simple:

sudo pip install supervisor

This assumes you have pip. If you don't:

@abishekrsrikaanth
abishekrsrikaanth / gist:a147952dfe93812fbf79a6ab0b215815
Created April 19, 2016 18:07 — forked from almays/gist:3928668
Unix conf: Sendy nginx rewrite rules
index index.php index.html;
root /your/path/to/the/sendy;
location = / {
index index.php;
}
location / {
if (!-f $request_filename){
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last;
import Vue from 'vue';
import Auth from '../mixins/user-auth';
import makeUserStore from '../store/user';
new Vue({
mixins: [Auth],
el: '.auth-wrapper',
store: makeUserStore(),
async mounted() {
let user = await this.__getUser();
<?php
class Request
{
private $is_last_session_id;
public function send($s_url, $data)
{
$params = [
import Vue from 'vue';
import PubNubVue from 'pubnub-vue';
import App from './App';
Vue.use(PubNubVue, {
subscribeKey: 'YOUR SUBSCRIBE KEY HERE',
publishKey: 'YOUR PUBLISH KEY HERE'
});
new Vue({
php artisan nova:resource Account/Resources/Customers --model="App\Domains\Account\Models\Customer"
use Laravel\Nova\Resource;
class Customer extends Resource
{
public static $displayInNavigation = false;
}
<?php
/**
* Get the displayable label of the resource.
*
* @return string
*/
public static function label()
{
return 'Emails Sent';
<?php
use Illuminate\Http\Request;
trait ResourceDoesNotRequireEditing
{
/**
* Determine if the current user can create new resources.
*
* @param Request $request