This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id="sun" width="2500" height="2000"></canvas> | |
<canvas id="mercury" class="fadeIn"></canvas> | |
<canvas id="venus" class="fadeIn"></canvas> | |
<canvas id="earth" class="fadeIn"></canvas> | |
<canvas id="mars" class="fadeIn"></canvas> | |
<canvas id="jupiter" width="800" height="300" class="fadeIn"></canvas> | |
<canvas id="saturn" width="800" height="300"class="fadeIn"></canvas> | |
<div id="rings" class="fadeIn"><img src="http://www.markinnes.co.uk/assets/img/ring.png" width="353"/></div> | |
<canvas id="uranus" class="fadeIn"></canvas> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Function to get a query paramater. In the following URL I need to get the paramater aberdeen to pass to Angular as an | |
alternative to using $location.search() which wont work in less than ie9. | |
http://mywebsite.co.uk/search/?location=aberdeen | |
*/ | |
function geturlParams(value) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Homestead | |
vagrant init laravel/homestead | |
# Generate Scaffold using way/generators | |
php artisan generate:scaffold site --fields="site_name:string, site_url:string, client_id:integer:unsigned, client_id:foreign:references(‘id’):on(‘clients’)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function clean($string){ | |
return htmlspecialchars(strip_tags($string)); | |
} | |
if (isset($_POST["send_enquiry"])) { | |
$response_array = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Enter the MySQL root password: " | |
read -s rootpw | |
echo -n "Enter database name: " | |
read dbname | |
echo -n "Enter database username: " | |
read dbuser | |
echo -n "Enter database user password: " | |
read dbpw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
clear | |
echo "YOU MUST NOT BE LOGGED IN AS ROOT WHEN RUNNING THIS SCRIPT as the owner of the folder will be Root" | |
echo "Domain name to set up: " | |
read domainname | |
cd /etc/apache2/sites-available | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE exp_members, exp_member_data, exp_member_homepage FROM exp_members | |
INNER JOIN exp_member_data | |
INNER JOIN exp_member_homepage | |
WHERE exp_member_data.member_id = exp_members.member_id | |
AND exp_members.member_id = exp_member_homepage.member_id | |
AND exp_members.group_id = '5' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh root@ip | |
mysql | |
create database dbname; | |
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; | |
grant all on dbname.* to user identified by 'password'; | |
flush privileges; | |
sudo mkdir -p /srv/www/sitename.com/web |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot /srv/www | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride all | |
</Directory> | |
<Directory /srv/www/> | |
Options Indexes FollowSymLinks MultiViews |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="viewport" content="initial-scale=1.0"> <!-- So that mobile webkit will display zoomed in --> | |
<meta name="format-detection" content="telephone=no"> <!-- disable auto telephone linking in iOS --> | |
<title>Form Submission Received</title> | |
<style type="text/css"> |
OlderNewer