Skip to content

Instantly share code, notes, and snippets.

View nissicreative's full-sized avatar

Mike Folsom nissicreative

View GitHub Profile
@nissicreative
nissicreative / web.php
Last active December 19, 2020 21:53
Laravel Web Routes Stub
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| Public Routes
|--------------------------------------------------------------------------
*/
@nissicreative
nissicreative / dreamhost-git.md
Last active August 18, 2024 05:04
Deploy to DreamHost using Git

DreamHost Git Deployment

On Local Server

Enable password-less ssh access:

cat ~/.ssh/id_rsa.pub | ssh username@server "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
# shortcut: copyrsa
@nissicreative
nissicreative / web-hosting.md
Last active February 21, 2018 15:49
Web Hosting Requirements and Considerations

Web Hosting

Required Components

  • Linux server with SSH/SFTP access (prefer key authentication)
  • Nginx or Apache Web Server
  • MySQL >= 5.6 (or MariaDB)
  • Ability to define web root directory and store files above web root
@nissicreative
nissicreative / gulpfile.js
Last active September 19, 2016 16:37
Laravel Elixir guplfile
const elixir = require('laravel-elixir');
elixir(function (mix) {
const bowerPath = './vendor/bower_components';
// Stylesheets
// -------------------------------------------------- //
// Compiles to public/css/app.css
mix.less('app.less', 'public/css', null, {
@nissicreative
nissicreative / laravel-new.md
Last active December 11, 2019 18:14
Laravel Site Setup

Laravel Project Setup

Configure Homestead Virtual Machine

(Create local database)

Update Homestead YAML File (sites and databases):

@nissicreative
nissicreative / dreamhost-php.md
Last active September 1, 2020 14:05
Update PHP and install Composer on DreamHost

DreamHost PHP

Make PHP 7 default binary for CLI

ssh <server>
@nissicreative
nissicreative / login.blade.php
Created September 14, 2016 13:50
Laravel Admin Login View
@extends('admin.layouts.plain')
@section('page-meta')
<title>{{ page_title('Login') }}</title>
@endsection
@section('content')
<div class="flex-container flex-center vh67">
@nissicreative
nissicreative / ResourcefulController.php
Last active February 28, 2019 10:43
Laravel Resourceful Controller Stub
<?php
// This is a stub for a "resourceful" controller
// Find & replace the following, then delete these comments!
//
// `MyModel` = name of model
// `MyController` = name of class
// `directory` = name of resource route: i.e. 'admin.users'
// `$collection` = variable identifying a collection: i.e. 'users' or 'categories'
// `$resource` = variable identifying a single resource: i.e. 'user' or 'post'
####################
# ALIASES
####################
alias cpwd="pwd | tr -d '\n' | pbcopy && echo 'Current working directory copied to clipboard.'";
alias flushdns="sudo killall -HUP mDNSResponder";
# .bash_profile
alias sbp="source ~/.bash_profile && echo '.bash_profile sourced.'";
alias subp="subl ~/.bash_profile";
@nissicreative
nissicreative / ncs.js
Created September 1, 2016 21:52
jQuery Utility Functions
//! ncsExternalLinks
// ================================================== //
(function($) {
$.fn.ncsExternalLinks = function() {
// Open external links in new window
$('a, area').filter(function() {
return this.hostname && this.hostname !== location.hostname;
}).not('.iframe').not('.ajax').not('.local').attr({