Skip to content

Instantly share code, notes, and snippets.

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

Devin Green artistro08

🏠
Working from home
View GitHub Profile
@artistro08
artistro08 / md5.php
Last active April 28, 2020 19:49
Add MD5 PHP function to OctoberCMS without a Plugin
// Put this in your code section in your layout
function onstart() {
$this['url_hasher'] = new class {
public function run($input) {
return md5($input);
}
};
}
@artistro08
artistro08 / gist:b7677551c54fe60e2f80f9f21ee72063
Created May 7, 2020 22:44
Automatic Deployment using Github Actions & appleboy/ssh
name: Deploy Develop
on:
push:
branches:
- develop
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
@artistro08
artistro08 / swiper.md
Created May 16, 2020 19:30
Really cool responsive slider Swiper.js
@artistro08
artistro08 / october.yaml
Created May 18, 2020 12:02
OctoberCMS Setup via OC Bootstrapper
app:
url: https://fcskc-website.test
locale: en
debug: true
cms:
theme: fcskc-website
edgeUpdates: false
disableCoreUpdates: false
enableSafeMode: false
@artistro08
artistro08 / cloudSettings
Last active October 23, 2020 17:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-12T12:51:51.480Z","extensionVersion":"v3.4.3"}
#!/bin/bash
inotifywait -m ~/.sites -e create -e moved_to |
while read dir action file; do
export file
echo "The file '$file' appeared in directory '$dir' via '$action'"
echo -e "\n127.0.0.1 $file.test\c" | powershell.exe gsudo wsl tee -a /mnt/c/Windows/System32/drivers/etc/hosts
done
@artistro08
artistro08 / october.yaml
Last active September 17, 2020 15:22
OctoberCMS Init
app:
url: http://example.test
locale: en
debug: true
cms:
theme: theme-name #no Spaces. dashes only
edgeUpdates: false
disableCoreUpdates: false
enableSafeMode: false
@artistro08
artistro08 / default.htm
Last active November 27, 2020 14:38
OctoberCMS Bootstrap Menu
{% if __SELF__.menuItems %}
<div class="collapse navbar-collapse" id="navcol-1">
<ul class="nav navbar-nav ml-auto">
{% partial __SELF__ ~ "::items" items=__SELF__.menuItems %}
</ul>
</div>
{% endif %}
@artistro08
artistro08 / sync.sh
Last active March 10, 2021 15:01
Sync Storage & Database from Local to Dev - OctoberCMS
#!/bin/bash
# OctoberCMS Deployment for Git managed Files
#
# I created this bash script because I found myself
# Typing the same commands over and over again to
# import my storage and database directories for
# Clients. Running this will (more or less) zip your
# storage directory, Export your database, and import
# your database & storage directory to the server
# Where you have git deployed.