Skip to content

Instantly share code, notes, and snippets.

View Illizian's full-sized avatar
🏠
Working from home

Alex Scotton Illizian

🏠
Working from home
View GitHub Profile
@Illizian
Illizian / DateTimeComponent.php
Last active September 28, 2021 14:05
Laravel localised DateTimes with UTC Database storage
<?php
namespace App\View\Components;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Carbon;
use Illuminate\View\Component;
class DateTime extends Component
{
@Illizian
Illizian / Display.py
Created March 21, 2020 16:23
A very simple VirtualLCD implementation (based on the VirtualDOM) for LCD Displays
from RPi import GPIO
from RPLCD.gpio import CharLCD
# Configure GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
class Display:
def __init__(
self,
@Illizian
Illizian / log.md
Created May 12, 2019 10:04
BSIDES London 2019 Pre-conference Capture the Flag (CTF) challenge

Notes

We've designed this CTF to be accessable to all levels of experiance and skill. There are 3 stages to the CTF. Each stage has a unique FLAG which is formattted as follows: FLAG{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}

.... - - .--. ---... -..-. -..-. ... - .- --. . .---- .-.-.- -... ... .. -.. . ... .-.-.- .-.. --- -. -.. --- -. .-.-.- ..--- ----- .---- ----. .-.-.- .--. .-- -. -.. . ..-. . -. -.. .-.-.- -.-. --- -- -..-.

@Illizian
Illizian / .zshrc
Last active May 26, 2017 06:14
A QoL ZSH/Bash script for Trezor related git activities
git() {
if command git rev-parse --git-dir > /dev/null 2>&1; then
# We're in a Git Repo
identity=$(command git config remote.origin.url | egrep -o '[a-z]+@[a-z]+.[a-z]+')
case "$1" in
commit)
command trezor-gpg unlock
command git $@
;;
@Illizian
Illizian / DOC.md
Last active May 21, 2017 09:25
Neopixel Control Server

Neopixel Control Server

Connection

The control server hosts an RFC-6455 WebSocket on Port 8765. You can use any compliant library or (where supported) the in-built Web Sockets API to connect.

Commands

The control server accepts commands as a string with the following structure:

@Illizian
Illizian / gh-dl-release
Last active September 30, 2016 09:06 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@Illizian
Illizian / README.md
Last active January 21, 2016 16:12
A script for generating the requisite directory structure for VSCode's "Local History" plugin

Having installed VSCode's Local History plugin I found that I was getting ENOENT errors. This command will generate the required directory structure within your projects .history folder.

Please Note: This will remove any existing .history folder from your project.

Installation

  1. Open your .bash_profile or .zshrc file
  2. Add script.sh to the bottom of the file
  3. Either restart your terminal, or run source .bash_profile or source .zshrc

Usage

@Illizian
Illizian / glyphicons.jsx
Created January 13, 2016 17:09
React Glyphicon Constants
var GlyphiconConstants = {
Glass: <span className='glyphicon glyphicon-glass' />,
Music: <span className='glyphicon glyphicon-music' />,
Search: <span className='glyphicon glyphicon-search' />,
Envelope: <span className='glyphicon glyphicon-envelope' />,
Heart: <span className='glyphicon glyphicon-heart' />,
Star: <span className='glyphicon glyphicon-star' />,
StarEmpty: <span className='glyphicon glyphicon-star-empty' />,
User: <span className='glyphicon glyphicon-user' />,
Film: <span className='glyphicon glyphicon-film' />,
<?php
// Create a plain request - Working
$request = Request::create('{API_ENDPOINT}', 'GET');
$response = Route::dispatch($request)->getContent();
// Create a request with secret in header
$request = Request::create('{API_ENDPOINT}', 'GET');
$headers = new Symfony\Component\HttpFoundation\HeaderBag(array('secret' => 'A_LONG_SECRET_KEY'));
@Illizian
Illizian / zsh-apache-virtual-hosts.zsh
Last active December 22, 2015 06:09
A zsh / bash script for setting up Apache virtual hosts automatically on ubuntu. Add to your .zshrc or .profile and run www domain.com
www() {
bold=`tput bold`
normal=`tput sgr0`
if [ ! $1 ] ; then
print "Usage: \n$ www url"
return 1
elif [ $1 ] ; then
username=$(id -un)@$(hostname)
echo "${bold}Creating www directories in /var/www/$1/${normal}"