Skip to content

Instantly share code, notes, and snippets.

View danielyewright's full-sized avatar

Daniely Wright danielyewright

View GitHub Profile
@danielyewright
danielyewright / install-docker.sh
Created August 30, 2026 11:23
Debian 13 Docker Install Script
#!/bin/bash
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove -y $pkg; done
# Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
@danielyewright
danielyewright / proxmox_pam_user.sh
Created March 8, 2024 02:51
Create Proxmox PAM user
#!/bin/bash
adduser yourname
pveum user add yourname@pam
pveum passwd yourname@pam
pveum aclmod / -user yourname@pam -role Administrator
#!/bin/bash
# update package index and install packages to allow repos over https
sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# setup stable repo
@danielyewright
danielyewright / docker-compose.yml
Last active August 13, 2026 01:27
Docker WordPress Dev
services:
db:
# WordPress supports MariaDB 10.11+
image: mariadb:10.11
command: '--default-authentication-plugin=mysql_native_password'
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: supersecretpassword
@danielyewright
danielyewright / app.js
Last active December 5, 2018 12:28
AngularJS Slideshow
var myApp = angular.module('myApp', []);
myApp.controller('SlideshowCtrl', ['$scope',
function ($scope) {
$scope.images = [
{
src: 'img_nature_wide.jpg',
title: 'Caption One'
},
{
@danielyewright
danielyewright / WP Customizer - Radio Buttons
Created December 29, 2017 16:06 — forked from Jespertastesen/WP Customizer - Radio Buttons
Add a Radio field to the WordPress Customizer.
$wp_customize->add_setting( 'themeslug_radio_setting_id', array(
'capability' => 'edit_theme_options',
'default' => 'blue',
'sanitize_callback' => 'themeslug_customizer_sanitize_radio',
) );
$wp_customize->add_control( 'themeslug_radio_setting_id', array(
'type' => 'radio',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Radio Selection' ),
@danielyewright
danielyewright / README.md
Last active June 6, 2017 14:14 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@danielyewright
danielyewright / README.md
Created December 24, 2016 02:59 — forked from fnichol/README.md
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@danielyewright
danielyewright / sql_column_update_hash.sql
Created September 22, 2016 17:01
Updates a column's values with a hash based on another column's data
UPDATE Customers SET client_id = HASHBYTES('SHA1', CONVERT(VARCHAR(12), PKEY))
@danielyewright
danielyewright / system_fonts.css
Created July 12, 2016 00:16
Default system fonts
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";