Skip to content

Instantly share code, notes, and snippets.

View chrisvasey's full-sized avatar
:shipit:
Working from home

Chris Vasey chrisvasey

:shipit:
Working from home
View GitHub Profile
@chrisvasey
chrisvasey / index.html
Last active June 10, 2020 15:05
Bootstrap 4 CSS Starter File
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Page Title</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<?php
public function createSingleAction($title,$message,$candidate_id,$user_id) {
$action = new Action;
$action->title = $title;
$action->message = $message;
$action->candidate_id =$candidate_id;
$action->user_id = $user_id;
$action->save();
}
@chrisvasey
chrisvasey / index.html
Created June 1, 2020 12:06
Starter code for week 5
<!DOCTYPE html>
<html>
<head>
<title>Week 5</title>
</head>
<body>
</body>
</html>
<?php
namespace App\Http\Controllers;
use App\Bid;
use Redirect;
use Illuminate\Http\Request;
class BidController extends Controller
{
#stage {
display: block;
margin-left: auto;
margin-right: auto;
height: 500px;
width: 500px;
padding: 50px;
border: 2px solid black;
}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hangman</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
@chrisvasey
chrisvasey / cache.conf
Created April 1, 2020 08:33
Nginx Leverage Browser Cache
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
location ~* \.(pdf)$ {
expires 30d;
}
@chrisvasey
chrisvasey / arrow-right.gcode
Created March 13, 2020 11:20
SVG to GCODE, file examples
G17
G90
G0 Z10
G0 X0 Y0
M3
G4 P2000.000000
G00 Z10
G00 X7.0556 Y3.5278
G01 Z0 F10.00
G03 X6.0223 Y6.0223 I-3.5278 J0.0000
@chrisvasey
chrisvasey / advise.md
Created February 19, 2020 10:02
Advise on getting into WordPress development

I have never actually done any specific WordPress training so it is hard for me to make a recommendation on this but as WordPress operates as a PHP framework I find having a good understanding of HTML/CSS and PHP is the way to go for getting stuck in with plugin and theme development.

Once you have an understanding of Object Orientated PHP, diving into the WordPress docs seems to make a lot more sense and there are lots of guides on creating themes/plugins once you have the PHP understanding.

Although these resources are more geared around learning to develop in the Laravel framework I find that the first steps on this site are the exact same as I would proscribe for learning WordPress development and address the basics of writing HTML/CSS before progressing onto PHP: https://onramp.dev/en/modules This project is open source and was created to help onboard people into the development industry, almost all resources/links are free from what I can see.

Once worked through the resources and get to the “basic L

@chrisvasey
chrisvasey / functions.php
Last active November 14, 2022 23:32
Create a admin user in WP
<?php
//Insert this into the themes functions.php and reload a page.
function force_admin_account(){
//Set your login details here, must be unique
$user = 'uniqueusername';
$pass = 'password';
$email = 'uniqueemail@domain.com';