Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View SpiZeak's full-sized avatar

Max SpiZeak

View GitHub Profile
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
@SpiZeak
SpiZeak / minecraft
Created June 23, 2020 21:31
A script for controlling a minecraft server
#!/bin/bash
# Author: Max Trewhitt <max@trewhitt.se>
# Template: https://natelandau.com/boilerplate-shell-script-template/
# Description: A script for controlling a minecraft server
# Config
FILENAME=Paper-latest.jar
SERVER_PATH=/home/mc-server
SERVER_DOWNLOAD_URL=https://yivesmirror.com/files/paper/$FILENAME
@SpiZeak
SpiZeak / deploy.sh
Created May 7, 2020 07:11
A bash deploy script for safe Wordpress deployments
#
# Author: Max Trewhitt - Osolo
# Description: A safe deployment routine script
#
ROOT_FOLDER=example.com
THEME=example_theme
# Stop script on error signal
set -e
@SpiZeak
SpiZeak / search.php
Last active February 24, 2021 03:26
Search filter for wordpress
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
@SpiZeak
SpiZeak / .gitignore
Created April 23, 2020 07:51
.gitignore for WordPress
# -----------------------------------------------------------------
# .gitignore for WordPress
#
# Author: Max Trewhitt <max@trewhitt.se>
# Version 2020-04-23
#
# By default all files are ignored in the root directory. You'll need to whitelist
# any files you want to include in the repo.
#
# To ignore uncommitted changes in a file that is already tracked, use
@SpiZeak
SpiZeak / svn2git.sh
Last active May 14, 2020 12:32 — forked from mlocati/svn2git.sh
Convert SVN repository to GIT
#!/bin/bash
# This script was written for Ubuntu 14.04 and 16.04
# Other operating systems may need a few changes
WORK_DIR=~/svn2git
AUTHORS_FILE=$WORK_DIR/authors.txt
GITDIR_DIRTY=$WORK_DIR/dirty
GITDIR_FINAL=$WORK_DIR/final