Skip to content

Instantly share code, notes, and snippets.

View chefThomas's full-sized avatar
🤫

Tom Dixon chefThomas

🤫
View GitHub Profile
@chefThomas
chefThomas / StackedList..jsx
Created November 19, 2022 05:02
Stacked List
const people = [
{
name: 'Calvin Hawkins',
email: 'calvin.hawkins@example.com',
image:
'https://images.unsplash.com/photo-1491528323818-fdd1faba62cc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
},
{
name: 'Kristen Ramos',
email: 'kristen.ramos@example.com',
@chefThomas
chefThomas / table.jsx
Created November 18, 2022 20:13
table component
const people = [
{ name: 'Lindsay Walton', title: 'Front-end Developer', email: 'lindsay.walton@example.com', role: 'Member' },
// More people...
]
export default function Example() {
return (
<div className="px-4 sm:px-6 lg:px-8">
<div className="sm:flex sm:items-center">
<div className="sm:flex-auto">

Demo: Configuring and Connecting to an Amazon RDS from DBeaver

Login to your AWS account first. If you haven't created an AWS account yet, go ahead and create one here, and then follow the steps below:

  1. Upon logging in, navigate to the RDS Dashboard by searching RDS and clicking the first result.

  2. Select the following configurations:

    • Create database
    • Standard create
    • Engine Options: PostgreSQL
  • Version: 10.16
@chefThomas
chefThomas / solution.js
Last active February 3, 2019 23:09
count array elements... without using length prop, plus more fun stuff
function getLength(arr, count=0) {
const iter = arr[Symbol.iterator]();
const { done } = iter.next();
if(done) {
return count;
}
else {
@chefThomas
chefThomas / solution.js
Last active January 6, 2019 16:25
Close Parentheses codewars simple string indices
// https://www.codewars.com/kata/simple-string-indices
function closeParens(str, openParenIndex) {
let gate = 1;
let closeParenIndex = -1;
for(let i = openParenIndex + 1; i <= str.length; i++) {
if(str[openParenIndex] != "(") {
return closeParenIndex;