Skip to content

Instantly share code, notes, and snippets.

View davidpeach's full-sized avatar
🖥️
I use Arch btw

David Peach davidpeach

🖥️
I use Arch btw
View GitHub Profile
#cloud-config
packages:
- nginx
#jq is a command-line json processor https://stedolan.github.io/jq/
- jq
- unattended-upgrades
runcmd:
- export DOMAIN=your_domain_here.com
- export DO_API_TOKEN=PASTE_YOUR_DIGITALOCEAN_API_TOKEN_HERE
- export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)
@davidpeach
davidpeach / cloud_config.yaml
Created August 12, 2020 19:42 — forked from MakersF/cloud_config.yaml
#cloud-config for Python application with Postgresql database and read_only role for DigitalOcean
#cloud-config
users:
- name: demo_user
shell: /bin/bash
ssh-authorized-keys:
- ssh-rsa [your -key]
packages:
- git
@davidpeach
davidpeach / gist:b78b8d80cf5c17fd2613d7cc138c8cde
Created October 23, 2018 19:11
An example follow request sent from mastodon to my test ActivityPub site
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1",
{
"manuallyApprovesFollowers":"as:manuallyApprovesFollowers",
"sensitive":"as:sensitive",
"movedTo":
{
"@id":"as:movedTo",
@davidpeach
davidpeach / .vimrc
Created February 9, 2016 00:52
My .vimrc file - early stages,
syntax enable
colorscheme desert
set backspace=indent,eol,start "Make backspace act like text editors
let mapleader = ',' "Make default leader key be comma
set number "Show line numbers
"------------- Mappings -------------"
@davidpeach
davidpeach / Material-Theme.sublime-theme 1 of 2
Last active August 31, 2015 10:09
My full, edited Material theme preferences file. ## In Two Parts ##
[
/* @ EMPTY WINDOW
* Style for empty (no tabs) window
========================================================================= */
{
"class": "sheet_container_control",
"layer0.tint": [38, 50, 56],
"layer0.opacity": 1.0
@davidpeach
davidpeach / ApiController.php
Last active August 29, 2015 14:23
Contains the functionality for parsing a Google Play Music URL for keeping track of albums I listen to. See http://davidpea.ch/articles/671 for the full post.
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use JonnyW\PhantomJs\Client;
use App\Listening;
use DB;
@davidpeach
davidpeach / WebmentionsController.php
Last active August 29, 2015 14:22
My Laravel 5 Webmention Controller from my personal website. This file handles both the receiving of webmentions and then their later conversion into comments / mentions on my site.
<?php namespace App\Http\Controllers;
use App\Mention;
use App\Webmention;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Carbon\Carbon;
use Mf2\Parser as Mf2Parser;