Skip to content

Instantly share code, notes, and snippets.

View danferth's full-sized avatar
🎸
Jammin till the break of dawn

Dan Klotz danferth

🎸
Jammin till the break of dawn
View GitHub Profile
@danferth
danferth / readme.md
Last active July 19, 2019 18:17
Development environment setup for wordpress

DigitalOcean Dev Environment Setup + wordpress install

Software needed

  • Text editor (Atom or Sublime is good)
  • Putty
  • WinSCP

Services Needed

  • Github
  • DigitalOcean Droplet
@danferth
danferth / readme.md
Last active May 8, 2019 17:10
MySQL Cheat Sheet

Check if MySQL installed

$ mysql --version

MySQL set up

run

$ sudo mysql_secure_installation
@danferth
danferth / readme.md
Last active May 1, 2019 16:48
AWS EC2 C9 setup 2019

Create instance

Use AWS Cloud9 to create an EC2 instance

  • set to Ubuntu
  • once complete open IDE
  • create info.php and an index.php

Set up viewing the application from outside of the IDE browser

This also will set the view to an elastic IP

In AWS veiw EC2 > instances

@danferth
danferth / 404.html
Created October 1, 2018 19:36
404 page
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="https://danferth.com/assets/favicons/favicon-16x16.png" type="image/png" />
<title>404</title>
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans:100,300|Sacramento" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
@danferth
danferth / .htaccess
Created September 29, 2018 00:07
My standard htaccess file
# ######################################################################
# This below is extracted from the HTML5 boilerplate htaccess file. #
# ######################################################################
#
# Apache Server Configs v3.0.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
@danferth
danferth / update-ubuntu.md
Last active August 29, 2015 14:27
Ubuntu update from terminal

To update Ubuntu from Terminal

Remember to use sudo of you are not logged in as root

apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot
@danferth
danferth / open-write-close-with-PHP.md
Last active August 29, 2015 14:27
open and write to file with PHP

Open a file and write to it with PHP

snippet to open a file, write to it (with timestamp), then close file with PHP

More can be found at fopen docs

@danferth
danferth / PDO classes.md
Last active May 15, 2023 01:17
PHP classes for PDO

PDO Classes for db connect and manipulation

Below is a description on how to use the classes in the below script

Include script and set up db variables

include 'zdb.php';
@danferth
danferth / helper.php
Created January 24, 2014 17:44
PHP helper functions
<php?
//fun helper function for debugging from http://net.tutsplus.com/tutorials/tools-and-tips/xdebug-professional-php-debugging/
function dump($value) {
echo ‘<pre>';
var_dump($value);
echo ‘</pre>';
}
?>

SQL Statements

Cheat sheet SQL staements

This is for SQL staements to be used in PHP

create table