Skip to content

Instantly share code, notes, and snippets.

View archy-bold's full-sized avatar

Simon Archer archy-bold

View GitHub Profile
@archy-bold
archy-bold / set-access-point.sh
Last active February 10, 2023 08:44
Script to find the access points for the given network SSID and set the BSSID for that network to the MAC of the access point with the highest strength
#!/bin/bash
# Usage: ./set-access-points.sh [network SSID] [network interface id = wlan0]
# Read in the arguements
ssid=$1;
interface=$2;
# SSID is required
if [ -z "$ssid" ]; then
<?php
class Php_ExcelWriter implements ExcelWriterInterface
{
protected $spreadsheet;
protected $writer;
protected $templateSheet = -1;
public function __construct()
{
@archy-bold
archy-bold / libxl-php-install.sh
Last active February 1, 2020 12:14
Install LibXL for PHP
#!/bin/sh
# Ensure we've got libxml2
apt-get update
apt-get install libxml2-dev
# Make /src directory, if required
mkdir /src
cd /src
@archy-bold
archy-bold / ExamplePassportTest.php
Last active October 15, 2022 03:49
Testing Passport Authenticated Controllers and Routes in Laravel
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExamplePassportTest extends \PassportTestCase
{
use DatabaseTransactions;
m.directive('ionSticky', ['$ionicPosition', '$compile', '$timeout', function ($ionicPosition, $compile, $timeout) {
return {
restrict: 'A',
require: '^$ionicScroll',
link: function ($scope, $element, $attr, $ionicScroll) {
var scroll = angular.element($ionicScroll.element);
var clone;
// creates the sticky clone and adds it to DOM
var createStickyClone = function ($element) {
clone = $element.clone().css({
@archy-bold
archy-bold / create-slimvc.sh
Last active September 16, 2015 16:48
Script to clone a SliMVC instance and do some basic setup, including changing project name and setting up the git repositry.
#!/bin/bash
# Input the project details
echo "Enter the project name:"
read name
echo "Enter a description for the project:"
read description