Skip to content

Instantly share code, notes, and snippets.

@jlollis
jlollis / README.md
Created May 3, 2021 17:32 — forked from AlinaNova21/README.md
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.

Prep

I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup

Credit: Mark Kraus
Website: https://get-powershellblog.blogspot.com

Collection Type Guidence

When to use what

  • Use Arrays if you know the element types and have a fixed length and/or known-up-front collection size that will not change.
  • Use ArrayList if you have an unkown collection size with either unknown or mixed type elements.
  • Use a Generic List when know the type of the elements but not the size of the collection.
  • Use a HashTable if you are going to do key based lookups on a collection and don't know the object type of the elements.
  • Use a Dictionary<TKey, TValue> you are going to do key based lookups on a collection and you know the type of the elements.
  • Use a HashSet when you know the type of elements and just want unique values and quick lookups and assignmnets.
@jlollis
jlollis / bash-cheatsheet.sh
Created August 12, 2020 17:07 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@jlollis
jlollis / The Technical Interview Cheat Sheet.md
Created December 29, 2019 03:40 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo since a gist is too difficult to maintain as an open source endevaor and there is no way to version it. I have updated below, but I will not be able to keep this one up to date so please checkout the repo instead. The below is just for some preservation for those who stumble across here.






\

@jlollis
jlollis / blockchain.md
Created December 11, 2019 18:50 — forked from daqo/blockchain.md
Blockchain Essentials for Developers

Blockchain Course

These are the notes that I have taken on “IBM blockchain Essentials for Developers” course on Coursera IBM Blockchain Foundation for Developers | Coursera.

Jargon

Ledger: the system of record for a business

Transaction: an asset transfer onto or off the ledger

@jlollis
jlollis / reset-pi-passwd.md
Last active November 11, 2024 07:40
Reset Forgotten Raspberry Password

Reset Forgotten Raspberry Pi Password

Remove SD Card

The first step is to turn off the Raspberry so you can remove the memory card without worry.

If the Raspberry Pi is not connected to a screen, the only way to turn it off is to unplug it. Otherwise, you can go through the GUI to turn it off properly, via the menu, before unplugging it.

Once the Raspberry Pi is turned off, you can insert the card into your computer and go to the next step.

@jlollis
jlollis / Rails add user in rails console
Created October 23, 2019 23:47 — forked from tacettin/Rails add user in rails console
Rails add user in rails console
This is quite a 'classic' problem and the immediate thought ("just do it mySQL") doesn't work here because of the need to have the rails piece that encodes a password that is entered.
So you need to actually use rails, something like this (this should all be happening in your local development environment which is the default when working locally):
You need to create a user.
Try this:
cd the_root_of_the_project
script/rails console
@jlollis
jlollis / scala-intellij-ide-setup-project-from-preexisting.txt
Last active October 18, 2019 00:48
Set up / import Scala projects into IntelliJ for Coursera's Functional Programming in Scala
In using IntelliJ Ultimate 2017.1 (on MacOS) and the tests for "Programming Assignment: Recursion" worked no problem.
Downloaded recfun.zip, unzipped. Move unzipped structure to "My Projects" folder
In IntelliJ closed existing projects. From the dialog box choose:
Import Project
Navigate to root of project folder and chose "recfun"
Make sure "Import from project from external model" is checked and highlight 'SBT'. Click next.
Choose SDK from dropdown 1.8 and Project Format ".idea ....."
Should load fine.
Changed the "stubbing" ??? in main.scala to some value say 1.
Then open one (of the three) unit tests say "PascalSuite" and right click from within the source, choose "Run PascalSuite" and see the results.
@jlollis
jlollis / download zip from URL and extract to folder bash
Last active October 17, 2019 20:55
download zip from URL and extract to folder bash - Coursera initial project folder setup (for all Coursera courses)
# get URL from the download link in the first assignment - they usually host everything in the same place
curl -sS http://URL/example.zip # gives you the directory structure where its hosted
curl -sS http://URL/example.zip > example.zip
mkdir directory
mv example.zip directory/example.zip
unzip directory/example.zip
tree
rm directory/example.zip
@jlollis
jlollis / recursive-gitkeep
Last active October 17, 2019 20:47
recursive gitkeep in bash
find . -type d -empty -not -path "./.git/*" -exec touch {}/.gitkeep \;