Skip to content

Instantly share code, notes, and snippets.

View tallguyjenks's full-sized avatar
🌱
Growing useful code

Bryan Jenks tallguyjenks

🌱
Growing useful code
View GitHub Profile
@tallguyjenks
tallguyjenks / examples.sh
Created May 24, 2020 05:58
Introduction to Bash Scripting
#!/usr/bin/env bash
##!/bin/bash
#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===
# Variables
#var1="hello"
#echo $var1
#var2="hello"
@tallguyjenks
tallguyjenks / package_load.R
Created August 31, 2020 16:01
Easily Load R Packages programmatically
# Package names
packages <- c('tidyverse', 'runes', 'patchwork')
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages])
}
# Packages loading
@tallguyjenks
tallguyjenks / todor_options.R
Last active November 19, 2020 20:42
Todor options()
# ....how to change searchable types for the function ----
options(todor_patterns = c("FIXME", "TODO"))
# This is to expand the scope of searches ----
# ....how to switch off markdown search ----
options(todor_rmd = T) # default is on / TRUE
# ....how to switch off rnw search ----
options(todor_rnw = T) # sweave files
# ....how to switch off rhtml search ----
options(todor_rhtml = T) # R Notebooks
# ....how to switch off packrat search ----
@tallguyjenks
tallguyjenks / RoamGruv.css
Created December 10, 2020 06:21
Gruvbox Dark Theme for Roam Research
/** Main Body */
.roam-body-main > div {
background-color: #282828;
color: #ebdbb2;
}
/** Top & Sidebars */
.roam-sidebar-content, .log-button, .bp3-icon, .rm-db-title, .roam-right-sidebar-content {
background-color: #1d2021 !important;
color: #ebdbb2 !important;
}
#!/usr/bin/env bash
#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#
# Grab a field
# echo "hello world this is Bryan" | awk '{print $1,$5}'
#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#===#
# Grab a column
@tallguyjenks
tallguyjenks / rates.py
Last active September 25, 2021 00:45
YouTube Sponsorship Calculator
#!/usr/bin/env python3.9
#
# Created by Bryan Jenks https://github.com/tallguyjenks on 2021-08-08
#
# You will need these libraries and can acquire them through the following commands
#
# pip install --upgrade google-api-python-client google-auth-oauthlib google-auth-httplib2 requests scrapetube
#
# YouTube API Python Quickstart guide:
# https://developers.google.com/youtube/v3/quickstart/python
@tallguyjenks
tallguyjenks / obsidian.md
Last active November 1, 2021 15:03
My custom theme for the Obsidian Editor

To get a copy of my most up to date custom CSS sign up to my monthly newsletter [[HERE]] Thank you! 🙏🏻️

@tallguyjenks
tallguyjenks / music_bot_example.py
Created November 4, 2021 05:07 — forked from Jonas1510/music_bot_example.py
A simple music bot written using discord.py rewrite and youtube_dl.
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Valentin B.
A simple music bot written in discord.py using youtube-dl.
Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly.
Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know.
---
title: "Obsidian Sentiment Analysis"
author: "Bryan Jenks"
date: "2020-10-10"
output: html_document
---
```{r}
require(here)
require(jsonlite)
@tallguyjenks
tallguyjenks / vault_stats.R
Created December 9, 2020 17:13
Stats and sentiment analysis on an obsidian vault
#!/usr/bin/env Rscript
# Install/Attach necessary packages to session
pkgs <- c('tidyverse','tidytext','tokenizers','DiagrammeR','glue')
xfun::pkg_attach2(pkgs)
#===============================================================#
#################### Environmental Variables ####################
vault_path <- '/Users/bryanjenks/Documents/Knowledge'
#===============================================================#