Skip to content

Instantly share code, notes, and snippets.

View spences10's full-sized avatar
💭
SvelteKit is bae!

Scott Spence spences10

💭
SvelteKit is bae!
View GitHub Profile
<script>
import { onMount } from 'svelte';
export let src;
let showPlayer = false;
let player;
onMount(async () => {
const { defineCustomElements } = await import('@vime/core');
defineCustomElements();
@spences10
spences10 / move-files.sh
Created March 9, 2023 13:17
A bash script to move files from a nested folder structure like `posts/2023/02/25/passing-sveltekit-page-server-js-data-to-page-js/index.md` and rename the `.md` file with the name of the parent folder and move it to a new folder.
#!/bin/bash
# create new folder called new
mkdir new
# find all index.md files in the folder structure
# and loop through them
find . -name 'index.md' | while read file; do
# get the parent folder of the index.md file
parent=$(dirname "$file")
@spences10
spences10 / box-drawing.md
Created May 11, 2017 10:33
App structure in text! Using box drawing characters
@spences10
spences10 / interviewQuestions.md
Last active December 29, 2022 05:18
List of questions to ask employers at interviews

Interview Questions You Should Ask

Why me as a candidate?

I like to ask this one so you can gauge if you're just there to make up the numbers or if they're really interested in you and have read your CV/profile.

How can I best prepare for this role before starting?

This question lets them know you're excited not only about the role, but also about starting and self-learning! You're a go getter and that's great! Plus, having this answered will give you a jump start on being prepared for your first day.

@spences10
spences10 / README.md
Created January 14, 2021 09:24
What a good README.md should have:

README.md

  • Description of the problem and solution.
  • Whether the solution focuses on back-end, front-end or if it's full stack.
  • Reasoning behind your technical choices, including architectural.
  • Trade-offs you might have made, anything you left out, or what you might do differently if you were to spend additional time on the project.
  • Link to other code you're particularly proud of.
@spences10
spences10 / description.md
Created February 26, 2017 11:08
VBA project password crack

VBA Project Password Crack

SO link

SO answer

Paste the two modules into and empty solution with the workbook you want to crack then run the code in module2

@spences10
spences10 / installJavaAndIntelliJ.sh
Last active August 20, 2022 19:21
Shell script to Install Java and IntelliJ for Ubuntu
#!/bin/sh
# Sources:
# http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
# http://askubuntu.com/questions/272314/setup-and-install-intellij-with-jdk
# https://gist.github.com/tahl/1658401
# guide on setting up IntelliJ from Tony Owen
# http://droidapp.co.uk/2012/12/29/switching-to-intellij-installation-and-setup/
# I have amended for my own purposes please refer to considerations in the Ask Ubuntu post
@spences10
spences10 / github-cheat-sheet.md
Last active March 22, 2022 17:59
GitHub Cheat Sheet

Useful Git commands

This is just stuff that I have put down that I find I use a lot of the time for my own reference.

Latest changes from repo to your machine

$ git pull
@spences10
spences10 / packages.json
Last active November 25, 2021 08:25
My winget install script, this is all the additional programs I needs for my webdevs and content creation
{
"$schema" : "https://aka.ms/winget-packages.schema.2.0.json",
"CreationDate" : "2021-11-25T08:23:12.657-00:00",
"Sources" :
[
{
"Packages" :
[
{
"PackageIdentifier" : "ModernFlyouts.ModernFlyouts"