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 for all your pull requests, GitHub integration and you can […]
Read moreLeetcode 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]] } return ans}
Read moreSimple 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 variable will hold the users input, and one for // […]
Read moreFixing “change_email script does not exist” on Auth0
If you’re seeing that error then you probably have a custom DB connection on Auth0, and the problem is that Auth0 could change the email for the user, but they don’t know how to change it on your database. The solution is to write a script showing Auth0 how to do it, similar to the login, create, verify scripts you have on the Database -> Custom Database page. Since this is a one time update, you can use the handy […]
Read more15 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. Summary of the Content What is Docker? Docker is a […]
Read moreSetting 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 portainer_data:/data portainer/portainer Testing Docker After you’ve successfully installed Docker Desktop, […]
Read moreMumble 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 a server with your username, but from a new or […]
Read moreResetting 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 `–skip-grant-tables` instruction. This allows anyone to log into the […]
Read moreNo 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 this command, and then try the pip install again: sudo […]
Read moreSetup 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 printer by using this command, just substitute the IP for […]
Read more