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';
#!/bin/bash | |
# log into your server | |
ssh root@[server ipaddress] | |
# change root password | |
passwd | |
# update all packages and operating system | |
apt-get update && apt-get --yes upgrade |
alert("hello"); |
// Include necessary data | |
// Initialize the database connection | |
// Include the common header markup | |
// Determine the page variables from the POST data | |
// Load the proper database info using the page vairiables | |
# Check which IPs are hitting a server | |
netstat -plant | awk '$4~/:80$/{print$5}' | awk -F: '{print$(NF-1)}' | sort | uniq -c | sort -nr | head | |
# Apache Report | |
curl -skL apachebuddy.pl | perl | |
# Last 200 commands of error log | |
tail -n 200 /var/log/apache2/error.log | |
# Memory / Max Clients |
# | |
# Timeout: The number of seconds before receives and sends time out. | |
# | |
Timeout 30 | |
# | |
# KeepAlive: Whether or not to allow persistent connections (more than | |
# one request per connection). Set to "Off" to deactivate. | |
# | |
KeepAlive On |
#!/bin/sh | |
# Import a remote database into a local database | |
# ---------------------------------------------- | |
# | |
# Based on http://danherd.net/quick-script-synchronise-from-a-remote-expressionengine-database/ | |
# | |
# Don’t forget chmod +x to make the script executable. | |
# | |
# Change the extension to .command to run the script directly from OS X Finder. |
# ---------------------------------------------------------------------- | |
# Password protect server | |
# ---------------------------------------------------------------------- | |
SetEnvIf Host DOMIANNAME.COM passreq | |
AuthType Basic | |
AuthName "Password Required" | |
AuthUserFile /srv/htpasswd/.htpasswd | |
Require valid-user | |
Order allow,deny |
Issues | |
General | |
======= | |
Database Ownership | |
Form Testing | |
Add On Update | |
Create Basecamp Project | |
Define Roles and Responsibilites |
export PATH=/Applications/MAMP/bin/php/php5.5.14/bin:$PATH | |
export PATH=~/.composer/vendor/bin:$PATH | |
alias bashpro="sudo sublime ~/.bash_profile" | |
alias reload_profile=". ~/.profile" | |
alias removeforce="rm -rf" | |
alias killDS='find . -name *.DS_Store -type f -delete' | |
alias hconf="sudo sublime /Applications/MAMP/conf/apache/httpd.conf" |