Skip to content

Instantly share code, notes, and snippets.

View babichjacob's full-sized avatar
🏳️‍🌈

J babichjacob

🏳️‍🌈
  • University of Michigan-Dearborn
  • Michigan, United States
View GitHub Profile
@hunterjm
hunterjm / tensorflow_setup.sh
Last active July 20, 2020 17:11
TensorFlow Object Detection Setup (Linux)
# Change this path to your config directory
CONFIG_DIR="/home/homeassistant/.homeassistant"
cd /tmp
# Clone the latest code from GitHub
git clone --depth 1 https://github.com/tensorflow/models.git tensorflow-models
# download protobuf 3.4
curl -OL https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip
@MaxXor
MaxXor / btrfs-guide.md
Last active July 19, 2024 11:07
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@acoyfellow
acoyfellow / $layout.svelte
Last active March 30, 2021 20:42
SvelteKit + firebase example in $layout.svelte
<script>
import "./styles.css";
import { session } from "$app/stores";
import { onMount, setContext } from "svelte";
import { writable } from "svelte/store";
let store = writable({});
setContext("store", store);
$: user = $session.user || null;
onMount(async () => {
@acoyfellow
acoyfellow / firebaseClient.js
Created March 18, 2021 15:33
Example of how to initialize firebase@exp
import { initializeApp } from 'firebase/app';
import { getAuth, onAuthStateChanged } from "firebase/auth";
import { getFirestore } from 'firebase/firestore';
import { getStorage } from "firebase/storage";
let ssrAuthed = window.ssrUser;
const firebaseConfig = {
// ...
};
@acoyfellow
acoyfellow / firebaseAdmin.js
Last active March 30, 2021 20:42
Example using firebase-admin in SK
import admin from "firebase-admin";
if (!admin.apps.length) {
admin.initializeApp({
credential: admin.credential.applicationDefault(),
databaseURL: 'your-url' // ...
});
};
const firebase = admin;