Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Steven Grant 1stevengrant

🏠
Working from home
View GitHub Profile
View job.md

Senior Developer

We are looking for an experienced developer to take the lead, define our codebase and architecture, help shape the team ethos and implement company production procedures with a focus on clean, maintainable and scalable code. Joining a team of dyed in the wool coders, the right candidate will have the chance to build and define their own team, procedures, and practices. You'll have a key role in forming our culture as well as delivering kickass software for the business community through the cloud.

We cherish hackers of all forms, whilst a strong social and moral agenda is valued in all applicants.

What you'll do

  • Take ownership of the codebase
View gist:a3ddab7c8e3ebaebac941faca9b7a1a3
<div className="bg-accent pb-32">
<nav className="bg-accent fixed top-0 left-0 right-0">
<div className="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div className="border-b border-gray-700">
<div className="flex items-center justify-between h-16 sm:px-0">
<DesktopNav isOpen={isOpen} setOpen={setOpen} />
{/* <img className="h-15 w-15" src={logo} /> */}
<p className="text-base text-2xl pr-3 text-white font-bold antialiased">
{data.site.siteMetadata.title}
</p>
View filesystems.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
@1stevengrant
1stevengrant / statamic.sh
Last active Jan 22, 2020
I was helping a friend get a Statamic instance running locally today.
View statamic.sh
#!/bin/bash
set -euo pipefail
echo "About to install the things Statamic needs to run locally..."
echo -n "Do you want to clear previous settings? (y/n)"
read answer
if echo "$answer" | grep -iq "^y"; then
echo "Clearing out previous settings..."
View gist:44e3e6d2730254f712c3753d5b499730
$data = [
"postcode" => "g728tu",
"key" => "ce2d2-f28bb-eab99-0364f",
"response" => "data_formatted",
];
$response = Zttp::get('http://pcls1.craftyclicks.co.uk/json/rapidaddress', $data);
return $response->json();
View VariableSingleDonation.vue
<template>
<form @submit.prevent="oneOff">
<label for="cardholder-name">Cardholder Name</label>
<input id="cardholder-name"
v-model="name"
class="block border mb-4 p-4 border-gray-500 w-full"
type="text">
<label for="amount">Amount</label>
<input type="number"
id="amount"
@1stevengrant
1stevengrant / DonationController.php
Created Jun 18, 2019
Laravel controller that accepts a custom donation amount via Stripe API
View DonationController.php
<?php
namespace App\Http\Controllers;
use App\Donation;
use App\Http\Requests\DonationRequest;
use App\Notifications\DonationReceived;
use App\Notifications\DonationThanks;
use App\User;
use Stripe\Charge;
View forms.css
.form-label {
@apply .mb-2 .block .text-sm .text-dark;
}
.form-input,
.form-textarea,
.form-select {
@apply .p-2 .leading-normal .block .w-full .border .text-dark .bg-light .text-sm .font-sans .rounded .text-left .appearance-none;
&:focus {
View gist:45f14b2724102157530c4121275550f8
### Keybase proof
I hereby claim:
* I am 1stevengrant on github.
* I am stevengrant (https://keybase.io/stevengrant) on keybase.
* I have a public key ASCF1aJS7MeIWFwUp9c0HKjZcxw8f7q-otTmqIyb7kNZwAo
To claim this, I am signing this object:
@1stevengrant
1stevengrant / video-tracking.js
Last active Feb 21, 2019
Google Analytics: HTML5 Video Tracking
View video-tracking.js
document.addEventListener('DOMContentLoaded', init, false)
var videoId = document.getElementById('video')
//var videoTitle = videoId.getAttribute('data-description')
var videoTitle = '宝宝身边有怪物'
function init () {
videoId.addEventListener('ended', videoEnd, false)
videoId.addEventListener('timeupdate', videoTimeUpdate, false)
videoId.addEventListener('play', videoPlay, false)
You can’t perform that action at this time.