Skip to content

Instantly share code, notes, and snippets.

View jakeydevs's full-sized avatar
🎯
Focusing

Jake Price jakeydevs

🎯
Focusing
View GitHub Profile
@jakeydevs
jakeydevs / DummyData.php
Created September 9, 2020 12:21
Laravel command to mass add data using a factory - focusing on speed of insert!
<?php
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Command;
class DummyData extends Command
{
/**
@jakeydevs
jakeydevs / export.ps1
Created June 26, 2020 10:28
Export slides as higher DPI in Microsoft 365 - Powershell
# Load file
$inFile = Read-Host -Prompt '👈 Input File'
# No idea what this does, but it needs it otherwise everything crashes
$officeFalse = [Microsoft.Office.Core.MsoTristate]::msoFalse
$officeTrue = [Microsoft.Office.Core.MsoTristate]::msoTrue
# Load Powerpoint Interop Assembly
[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Powerpoint") > $null
[Reflection.Assembly]::LoadWithPartialname("Office") > $null
@jakeydevs
jakeydevs / everything.bash
Last active May 21, 2019 08:00
All in one - from DO to Laravel App
#! /bin/bash
# This script is my all in one Laravel dev enviroment for
# remote working. DO NOT USE ON LIVE SERVICES AS THERE COULD
# BE ISSUES
#
# It does:
# - Sets up PHP dependancies
# - Installs Composer
# - Creates MYSQL user
@jakeydevs
jakeydevs / update.sh
Last active May 11, 2019 14:06
DigitalOcean 18.06 - Laravel Ready Script
#! /bin/bash
# This script will take a default DigitalOcean droplet and
# install and configure all software needed to get an app
# running on it quickly.
#
# @author @JakeLPrice
# @created 11 May 2019
# 0. Update apt-get
@jakeydevs
jakeydevs / update.sh
Last active October 25, 2018 10:41
Takes the default Digtalocean LAMP 18.06 droplet image and makes it ready for Laravel
#! /bin/bash
# Please only run IF YOU ARE SURE YOU SHOULD!
#
# This script will remove PHP and attempt to install the latest
# "Stable" version! To help me with LARAVEL installations, it'll
# also install composer and turn on mod_rewrite as well if it cannot
# be sure it is installed
#
# @author @JakeLPrice
@jakeydevs
jakeydevs / update.sh
Last active November 21, 2018 05:27
Update script to turn PHP 7.0 to 7.2 - blog post explaning at wildrocket.io/
#! /bin/bash
# Please only run IF YOU ARE SURE YOU SHOULD!
#
# This script will remove PHP and attempt to install the latest
# "Stable" version! To help me with LARAVEL installations, it'll
# also install composer and turn on mod_rewrite as well if it cannot
# be sure it is installed
#
# @author @JakeLPrice
11110100110011101000100
1100111000010101011111000
11010110010010011110100
1111010011011100001001
1100011010000111110101010
1100111010011110010101011
1010100000111110000010011
<div>
<iframe src="link-to-embed" style="width:100%;min-height:700px" seamless="seamless"></iframe>
</div>
@jakeydevs
jakeydevs / dup.bash
Created August 2, 2016 14:44
Duplicates a 1 page PDF file 10 times
#!/bin/bash
for i in {2..10}
do
./pdftk 1.pdf $i.pdf cat output $(($i+1)).pdf
rm $i.pdf
done
@jakeydevs
jakeydevs / test.php
Last active April 16, 2016 17:53
Run every X seconds
<?PHP
//-- Run at least every 5 seconds
$diff = 5;
//-- Get my time
$time_check = 0;
//-- Always run
while (1) {