Skip to content

Instantly share code, notes, and snippets.

View danielyewright's full-sized avatar

Daniely Wright danielyewright

View GitHub Profile
@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 March 6, 2020 03:10
Docker WordPress Dev
version: "3"
services:
# Container 1
# https://hub.docker.com/_/mysql
db:
image: mysql:5.7
restart: always
volumes:
- db_data:/var/lib/mysql
@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";
@danielyewright
danielyewright / sublime-command-line.md
Created July 9, 2016 05:11 — forked from adrianorsouza/sublime-command-line.md
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup