Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):
class Shop extends Eloquent {}
Using custom table name
protected $table = 'my_shops';
| # useful general .bash_profile tweaks for color loving VI fans | |
| export TERM=xterm-color | |
| export GREP_OPTIONS='--color=auto' GREP_COLOR='1;36' | |
| export CLICOLOR=1 | |
| alias ls='ls -G' | |
| export LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rb=90' | |
| export COLOR_NC='\e[0m' # No Color | |
| export COLOR_WHITE='\e[1;37m' | |
| export COLOR_BLACK='\e[0;30m' |
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 tab color commands | |
| # https://iterm2.com/documentation-escape-codes.html | |
| if [[ -n "$ITERM_SESSION_ID" ]]; then | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" |
| "statusline setup | |
| set statusline=%f "tail of the filename | |
| "display a warning if fileformat isnt unix | |
| set statusline+=%#warningmsg# | |
| set statusline+=%{&ff!='unix'?'['.&ff.']':''} | |
| set statusline+=%* | |
| "display a warning if file encoding isnt utf-8 | |
| set statusline+=%#warningmsg# |
| //index.js | |
| var express = require('express'), | |
| app = module.exports = express.createServer(), | |
| mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/nodeAuth'); | |
| //configure app | |
| app.configure(function() { | |
| app.set('views', __dirname + '/views'); |
| # | |
| # UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
| # just run "sudo trimforce enable" to activate the trim support from now on! | |
| # | |
| # Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
| # Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
| # | |
| # Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
| # | |
| # Alternative to http://www.groths.org/trim-enabler-3-0-released/ |
| # Clone Fire.app | |
| git clone git://github.com/handlino/FireApp.git | |
| # (IMPORTANT) Update git submodules | |
| cd FireApp | |
| git submodule init | |
| git submodule update | |
| # Switch to JRuby (I'm using 1.6.7.2.) | |
| rvm use jruby |
| #!/bin/bash | |
| # | |
| # Enable TRIM support for 3rd Party SSDs. Works for Mountain Lion, should work on earlier OSes too. | |
| # Tested on 10.8.2, 10.8.3, 10.8.5, 10.9.0-10.9.5, 10.10.0-10.10.1, 10.10.4 | |
| # | |
| # Run this script at your own risk, whether on 10.10 or earlier. | |
| # | |
| # This script works on MacOS 10.10-10.10.1 (Yosemite) but it has significant system security repercussions. | |
| # To use it you must disable kext signing on your machine. This makes it easier for | |
| # malware to infect your machine by disabling the feature which would detect unsigned |
| ------------------------------------------------------------------------------------------------------------------------------- | |
| DESCRIPTION: | |
| Notes for installing Apache - PostgreSQL - PostGIS - PHP (LAPPP) on an AWS EC2 Ubuntu 16.x Server for development. | |
| ------------------------------------------------------------------------------------------------------------------------------- | |
| --------------------------------------------------------- | |
| PART 1: Stand Up an Ubuntu 16.x server on AWS EC2 | |
| --------------------------------------------------------- |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.