This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services; | |
use AllowDynamicProperties; | |
use App\Exceptions\UnableToFindRegistrationDataInTheFuture; | |
use App\Exceptions\UnknownRegistrationType; | |
use App\Logic\ConductAndRewards\CreditsAndDemerits\Credit; | |
use App\Models\House; | |
use App\Models\Pupil; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Current implemention | |
<a href="tel:++441483+123456" style="color:rgb(2,30,66)" target="_blank">Office: +441483 123456</a> | |
// Suggested implemention | |
<a href="tel:+441483123456" style="color:rgb(2,30,66)" target="_blank">Office: +44 (0) 1483 123456</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="padding:56.25% 0 0 0;position:relative;"> | |
<iframe src="https://player.vimeo.com/video/1016990175?badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="Talent Webpage Video without logo"></iframe> | |
</div> | |
<script src="https://player.vimeo.com/api/player.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Actions\GuessWho; | |
use Illuminate\Support\Collection; | |
class GenerateGame | |
{ | |
public Collection $answers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
########################################################################## | |
## IF YOU CHANGE THE PROCESS PLEASE WRITE ABOUT IT ## | |
## https://wiki.cranleigh.org/doku.php?id=website-2016-backup-process ## | |
########################################################################## | |
# 1. SET VARIABLES | |
BACKUPTIME="www.cranleigh.org-$(date +"%Y-%m-%d")" | |
BACKUP_DIRECTORY="/var/www/vhosts/www.cranleigh.org/auto_backups" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## When the Senior School Database was overloading some tables and we weren't sure why we have to optimize the DB every day. | |
## This was the code I used. | |
mysql -e "SELECT TABLE_NAME FROM (SELECT TABLE_SCHEMA,TABLE_NAME,Round(Sum(data_length + index_length) / 1024 / 1024 / 1024, 2) 'TABLEsizeGB' FROM information_schema.tables WHERE TABLE_SCHEMA='seniorschool' GROUP BY TABLE_SCHEMA,TABLE_NAME HAVING Round(Sum(data_length + index_length) / 1024 / 1024 / 1024, 2) > 0.05 ORDER BY TABLEsizeGB DESC) as A;" | while read TABLE_NAME; do | |
if [ $TABLE_NAME != 'TABLE_NAME' ] | |
then | |
mysqlcheck --optimize seniorschool $TABLE_NAME | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
new AssetGallery(); | |
class AssetGallery { | |
function __construct() { | |
add_shortcode("latest_assets", array($this, 'shortcode')); | |
} | |
function shortcode($atts) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* We were auditing ~1000 iPads, and found that if you use a Barcode Scanner to | |
* get the Serial number of a product, it tended to prefix the serial number | |
* with "S". This was annoying as we were then trying to programatically | |
* match Serial Numbers against a 3rd party API which didn't have the | |
* S prefixed!. | |
* | |
* This gets rid of the S. We found that all our iPad serial numbers | |
* started with either "DM" or "F9", but you can change that by | |
* setting your own $startingChars. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function df_tweetEntrant($user) { | |
// Tweet Entrant | |
// Follow Entrant | |
//Sanatize $user | |
$user = trim($user); | |
if (strpos($user,'@') !== false) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: fredbradley | |
* Date: 05/10/2017 | |
* Time: 11:43 | |
*/ | |
namespace FredBradley\CranleighWPAdmin; |
NewerOlder