Skip to content

Instantly share code, notes, and snippets.

View fuzzylimes's full-sized avatar

Zach Cochran fuzzylimes

View GitHub Profile
@fuzzylimes
fuzzylimes / README.md
Last active July 10, 2021 19:46
Running Selenium on a Raspberry Pi 3B (Python/Firefox)

Running Selenium on a Raspberry Pi 3B

I wasted too many hours trying to get this to work. Almost every stack overflow post was useless, aside from this one. In my case, I was using Python and Firefox. The following are the steps I had to take in order to get selenium working:

1. Update packages

sudo apt-get update

2. Install firefox-esr

sudo apt-get install firefox-esr

In my case, the most recent supported version is 52.9.0. Yes this is as ancient as it looks, but it will work.

@fuzzylimes
fuzzylimes / log4j.properties
Created May 16, 2020 14:10
Basic slf4j config for maven project
# Root logger option
log4j.rootLogger=INFO, stdout
# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
@fuzzylimes
fuzzylimes / SpringConfig.md
Created January 21, 2019 14:31
Understanding Spring Config Server/Clients...

Spring Config

I don't understand why every document/tutorial I have read on this subject makes it so hard to understand. It's actually pretty straight forward, and it kills me that I've wasted so much of my time stumbling through all of this.

This set of notes will explain how the config server works, how to use it for multiple profile types, and what you need to get it running in your environment.

What it do?

The config server's entire purpose is to provide a way for other services in your system to get their configuration information. It is a service itself that other services query and it will return back their configuration information at startup and during runtime.

You have 2 main methods for providing this configuration information:

  1. Reference a github repository
@fuzzylimes
fuzzylimes / README.md
Created January 20, 2019 15:33
Spring Initializer Unzip, Open, and Delete
@fuzzylimes
fuzzylimes / helpfulSnips.md
Created July 15, 2018 19:02
Helpful javascript snippets

Remove all type unidentified from array

arr = arr.filter(function(n){ return n != undefined }); 

Fully clear a terminal

process.stdout.write('\033c');
@fuzzylimes
fuzzylimes / learningPandas.md
Created June 23, 2018 11:07
Python Pandas Notebook

Things that I need to be able to do

Import from csv into memory

To create a dataframe from a csv, you can use the following:

df = pd.read_csv('pandas_dataframe_importing_csv/example.csv')

If you have a different delimiter than a comma, you can use the sep parameter:

df = pd.read_csv('pandas_dataframe_importing_csv/example.csv', sep="\|", engine="python")
@fuzzylimes
fuzzylimes / git_notes.md
Last active July 15, 2018 19:02
Git commands that I always forget...

Basic stuff

  • git init will create an empty git repo
  • Git does not store multiple versions of the code
  • Initial commit will create the master branch

git log

  • Shows the git commit history
  • HEAD will follow the latest commit

Checkout to specific commit

@fuzzylimes
fuzzylimes / package.json
Created May 31, 2018 23:59
Trying to figure out express-sessions
{
"name": "requesttest",
"version": "1.0.0",
"description": "Testing out requests",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev:server": "nodemon --ignore sessions/ server.js"
},
"author": "fuzzylimes",
@fuzzylimes
fuzzylimes / app.js
Created May 16, 2018 10:48
User thing
const express = require('express');
const exphbs = require('express-handlebars')
const app = express();
// Handlebars Middleware
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
app.set('view engine', 'handlebars');
function homePage(req, res) {
@fuzzylimes
fuzzylimes / notes.md
Last active May 9, 2018 21:19
Javascript Notes

Javascript Notes

Basics

Notes

  • No issue using either single ' or double " quotes, it's all preference/styling

Loging to console

console.log('hello world!');