Your Cart

Alternative to Netlify and Vercel

Problem: Paying per user is getting expensive for a service that just hosts some static files. It’s not 2010 anymore so who wants to deal with nginx configs? Well luckily for you there’s a couple great solutions Cloudflare Pages Essentially a 1 for 1 replacement for Netlify and Vercel, plus it has a great free tier and then goes up to $20/month for more concurrent builds. It has build previews […]

Leetcode 1920. Build Array from Permutation in Golang

https://leetcode.com/problems/build-array-from-permutation/ We need to loop through the nums array and fill in a new array in the proper order. func buildArray(nums []int) []int { // Create a new array of the same size as nums ans := make([]int, len(nums)) // Loop through nums for index, _ := range nums { // Fill in the new array with the proper value from nums, // taken from the question ans[index] = nums[nums[index]] […]

Simple Input Form in React

Here’s how to create a basic form that takes in some user input and sends it off to a backend server. I’ve kept the sample up to date for React’s best practices in 2021, along with some comments to help you customize it for your needs. import React, { useState, useEffect } from “react”;import * as ReactDOM from ‘react-dom’const axios = require(‘axios’);const App = () => { // One state […]

15 minute recap of a Defcon Talk on Containers

The talk is  “An Attacker Looks at Docker: Approaching Multi-Container Applications“ by Wesley McGrew and can be found here. My presentation at TASK Google Slides – create and edit presentations online, for free. Create a new presentation and edit with others at the same time. Get stuff done with or without an internet connection. Use Slides to edit PowerPoint files. Free from Google. create and edit presentations online, for free. […]

Setting up Docker on your Computer

For Windows and Mac OS X there’s an easy new application called Docker Desktop that will contain everything you need, download it here. For Linux, just follow the guides here. If you want a GUI on Linux, and I would highly recommend it, install Portainer by running the following commands after installing docker: $ docker volume create portainer_data$ docker run -d -p 8000:8000 -p 9000:9000 –name=portainer –restart=always -v /var/run/docker.sock:/var/run/docker.sock -v […]

Mumble Connection Problems

Aside from the usual incorrect server address/port problems, there are  two common problems people run into. Also, almost all mumble servers are  self signed. So if you receive the “This certificate is not trusted”  message, it’s usually okay to accept it anyways. On that topic, for  murmur administrators, Mumble wrote up how to get a free signed cert  [here](https://wiki.mumble.info/wiki/Mumble_Certificates) Problem: This  user is already registered This happens when connecting to […]

Resetting Root MySQL password for MariaDB on CentOS

You’ve lost the root password for your MariaDB database – now what do  you do? You can’t recover your existing password, but you can get into  your database to create a new root password. You just need root  privileges on the Linux server that is running MariaDB. Stop the  database using the systemctl command: `systemctl stop mariadb.service`   Now we’re going to start up the SQL server but with the […]

No module named dbus

A rather annoying error that I recently encountered where dbus wasn’t  installed correctly. My setup was python 3 on debian stretch and the  following commands didn’t fix it: sudo apt install python-dbusorsudo apt install python3-dbus Then I tried pip install dbus-python and got a build time error, the output showed: checking for DBUS… noconfigure: error: Package requirements (dbus-1 >= 1.8) were not met: and the final solution was to run […]

Setup Network Printing on Debian 9

I have a Brother MFC-9340CDW printer that’s setup and running on the network. First I went through the Brother linux pre-install steps and installed whatever I needed for debian. Next I installed the Brother printer software from here. I installed both the brscan 64bit and scan-key-tool 64bit. Then I went to the printer and found its IP address, you could also  nmap your local network for it. Next, configure your […]