View svn2git.sh
This file contains 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/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 |
View .gitignore
This file contains 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
# ----------------------------------------------------------------- | |
# .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 |
View search.php
This file contains 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 | |
/** | |
* [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; | |
} |
View deploy.sh
This file contains 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
# | |
# Author: Max Trewhitt - Osolo | |
# Description: A safe deployment routine script | |
# | |
ROOT_FOLDER=example.com | |
THEME=example_theme | |
# Stop script on error signal | |
set -e |
View minecraft
This file contains 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/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 |
View arduino.ino
This file contains 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
#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) |