Skip to content

Instantly share code, notes, and snippets.


Charles Roper charlesroper

View GitHub Profile
charlesroper / codeswing.json
Last active Apr 12, 2021
Vanilla JS Accordion
View codeswing.json
"scripts": [],
"styles": []
charlesroper / ruleset.xml
Last active Mar 13, 2021
CodeIgniter 4 coding standard for ShropBotSoc project #CodeIgniter #PHPCS
View ruleset.xml
<?xml version="1.0" encoding="UTF-8" ?>
<ruleset name="CodeIgniter4">
<description>CodeIgniter 4 coding standard for PHP_CodeSniffer</description>
* CodeIgniter 4 coding standard for PHP_CodeSniffer
* @author Louis Linehan <>
* @copyright 2017 British Columbia Institute of Technology
* @license MIT License
View countup.js
function countup (n) {
console.log(`we are in ${}(${n})`);
console.log(`is ${n} < 1?`, n < 1);
if (n < 1) {
console.log(`so we're going to return [] back to the caller\n↓`);
return [];
console.log(`so we call countup(${n-1})\n↓`);
charlesroper / wslton.omp.json
Last active Feb 26, 2021
Oh my Posh 3 custom theme - wslton. Based on negligible.
View wslton.omp.json
"$schema": "",
"blocks": [
"type": "prompt",
"alignment": "left",
"segments": [
"type": "os",
"style": "plain",
View nyt-api.js
const express = require("express");
const fetch = require("node-fetch");
const cors = require("cors");
const app = express();
const NYT = {
endpoint: "",
apiKey: process.env.NYT_API_KEY
View wsl-set-default-user.ps1
# Know the id of the username in the original distro that was exported
wsl -d Ubuntu-20.04 -u charlesr -e id -u
# Outputs 1000
# Knowing the id of the username in the distro that was created by importing the tar image
wsl -d UbuntuShropBot -u charlesr -e id -u
# Outputs 1000
# I would want to use this distroname and id, to set this user as the default login profile of WSL.
# I set this up in Windows Registry with the line snippet below:
charlesroper / bigr2.html
Last active Dec 6, 2020
brc-atlas-bigr test
View bigr2.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>brc-atlas-bigr test</title>
<script src=""></script>
<script src=""></script>
charlesroper / All non-FSC users not enrolled on any courses.sql
Created Oct 13, 2020
All non-FSC users not enrolled on any courses
View All non-FSC users not enrolled on any courses.sql
mdl_user u
LEFT JOIN mdl_user_enrolments e ON = e.userid
LEFT JOIN mdl_role_assignments a ON = a.userid
charlesroper / responsive-youtube.html
Last active Aug 22, 2020
Responsive YouTube embed
View responsive-youtube.html
- Replace the standard domain with for enhanced performance and privacy
- Add ?rel=0 to the end of the URL to remove suggested videos
<div class="embed-responsive embed-responsive-16by9">
<iframe src=""
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
charlesroper / responsive-vimeo.html
Last active Aug 24, 2020
Responsive Vimeo embed
View responsive-vimeo.html
Replace "" with the URL from the default embed code
<div class="embed-responsive embed-responsive-16by9">
<iframe src=""
allow="autoplay; fullscreen"