Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# clone the repo
git clone https://github.com/mindandmill/grafana-sms /opt/grafana-sms
# go to that directory
cd /opt/grafana-sms
# ask for node red token, then make an .env file and store it as the value for NODERED_TOKEN
read -p "Enter the Twilio Node-RED token" token
#!/bin/bash
echo 'Installing Grafana-SMS...'
# Creates folder, sets permissions to current user, and changes directory
sudo mkdir /usr/local/share/grafana-sms
sudo chown $(whoami): /usr/local/share/grafana-sms
cd /usr/local/share/grafana-sms
# Downloads the latest release of Grafana-SMS
<?php
namespace Laravel\Nova\Metrics;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Laravel\Nova\Nova;
abstract class Value extends RangedMetric
{
@cwilby
cwilby / TastyIgniter Setup.md
Last active August 6, 2022 15:01
TastyIgniter Setup.md

TastyIgniter

TastyIgniter is a self-hosted, open source order management system to give businesses a way to provide online pickup/delivery for their customers.

Quickstart

Phase 1 - Application Setup

  • Create a LEMP Droplet on DigitalOcean.
  • Create an A record in your domain's DNS settings that points your domain name to your droplet's IP address.
@cwilby
cwilby / Twig2Schema.php
Last active July 30, 2020 08:16
A PHP Class for inferring variables from a Twig template
<?php
class Twig2Schema
{
/**
* @param \Twig\Environment $twig - A twig environment containing loaded templates
* @param $twigTemplateName - The name of the template to infer variables from
* @param $config - A configuration object for this function
* @return array
*/
version: 2
jobs:
build:
docker:
- image: 'cwilby/php7.1-laravel-circleci'
- image: 'circleci/buildpack-deps:latest'
- image: 'circleci/mysql:5.6.38-ram'
- image: 'circleci/node:8.12-browsers'
- image: 'circleci/redis:latest'
acmeco: Are you sure you want to destroy the 'acmeco' VM? [y/N] y
==> acmeco: Forcing shutdown of VM...
==> acmeco: Destroying VM and associated drives...
Bringing machine 'acmeco' up with 'virtualbox' provider...
==> acmeco: Importing base box 'laravel/homestead'...
==> acmeco: Matching MAC address for NAT networking...
==> acmeco: Checking if box 'laravel/homestead' is up to date...
==> acmeco: Setting the name of the VM: acmeco
==> acmeco: Fixed port collision for 3306 => 33060. Now on port 2200.
==> acmeco: Clearing any previously set network interfaces...
@cwilby
cwilby / ssl-proxy-jenkins.sh
Last active April 28, 2018 22:04 — forked from freemanirl/ssl-proxy-jenkins.sh
LetsEncrypt Jenkins SSL Proxy Nginx
#!/bin/bash
sudo apt-get install -y epel-release nginx certbot
sudo apt-get install -y certbot
sudo setsebool -P httpd_can_network_connect 1
# install well-known conf in nginx.
systemctl restart nginx.service
certbot certonly -a webroot --webroot-path=/usr/share/nginx/html -d jenkins.cwserve.com
@cwilby
cwilby / README.md
Last active February 16, 2018 00:07
Loopback Remote Method

Problem

Given models A and B (where A has many B), what is the most performant way to accomplish the following with Loopback?

* Create A
* Create B
* Add B to A

Solution A - Remote Method