This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
this fork downloads all formats and does so without using jquery (since that didnt work for me) | |
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this | |
Settings (chrome://settings) --> Advanced --> Privacy and security --> Content settings --> PDF documents --> Download PDF files instead of automatically opening them in Chrome --> Turn ON | |
Settings (chrome://settings) --> Advanced --> Downloads --> Ask where to save each file before downloading --> Turn OFF | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified from https://github.com/plynty/bls-ce-r-tools/blob/master/CE_PUMD_Wrangler.R | |
# Function that installs and librarys as many packages as you want in one sweep | |
# This action is similar to the utils::install.packages function | |
# just simplified/custom for my needs | |
# Parameters: string of package(s) name(s) | |
# fOnlyEnsureInstalled if TRUE does not load packages... | |
# Usage: library.packages("data.table","dplyr","stringr","dtplyr") | |
# Returns a matrix of packages and status of install and load/attachment | |
library.packages <- function( | |
..., |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# failed to perform conditional arithmatic when using #!/bin/sh | |
# Made available under (CC BY-SA 3.0) https://creativecommons.org/licenses/by-sa/3.0/ | |
# The menu system as modified from https://askubuntu.com/a/257766/957393 | |
# The option_picked function is by Jeremy D. Gerdes seakintruth@gmail.com April 2019 | |
# The install_if_missing is modified from https://stackoverflow.com/a/22592801/1146659 | |
# ------------------------------------------------------------------------------------- | |
# Before running this script Install R and Rstudio with/from: | |
# sudo apt install r-base | |
# https://rstudio.com/products/rstudio/download/#download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "afkCobblestoneGenerator.sh::Run the most recent version with either of:" | |
echo "bash <(curl -s https://gist.githubusercontent.com/seakintruth/7610cac5df7bfd1c9acc13794a01c59a/raw)" | |
echo "bash <(wget -q -O - https://gist.githubusercontent.com/seakintruth/7610cac5df7bfd1c9acc13794a01c59a/raw)" | |
install_if_missing() { | |
# https://stackoverflow.com/a/22592801/1146659 | |
local package_name=$1 | |
if [ $(dpkg-query -W -f='${Status}' $package_name 2>/dev/null | grep -c "ok installed") -eq 0 ]; then | |
echo -n "Attempt to install package $package_name? [yes or no]: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "afkZombieXpFarm.sh::Run the most recent version with" | |
echo "bash <(curl https://gist.githubusercontent.com/seakintruth/27c93bf174c2cc25131932be34e32fa3/raw)" | |
echo "bash <(wget -q -O - https://gist.githubusercontent.com/seakintruth/27c93bf174c2cc25131932be34e32fa3/raw)" | |
echo "clicking: $1" | |
echo [ -z "$*" ] | |
date1=$((`date +%s`)); | |
i=0; | |
# Building functions per https://tldp.org/LDP/abs/html/complexfunct.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo -s apt-get update | |
sudo -s apt-get upgrade -y | |
launcherUrl="https://launcher.mojang.com/download/Minecraft.deb" | |
fLauncher="$(mktemp /tmp/myscript.XXXXXX)" | |
echo "Downloading minecraft.deb to tempfile $fLauncher ..." | |
wget -P $fLauncher $launcherUrl | |
sudo -s apt-get install $fLauncher | |
echo "Deleting tempfile $fLuancher ..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
while true | |
do | |
if pgrep -x java >/dev/null | |
then | |
echo "Java is running, assuming minecraft is running: $(date)" | |
else | |
echo "Java not running, Starting minecraft server... $(date)" | |
# screen doesn't allways cleanup properly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Notes: Visual Basic (VBScript, or VBA) to handle UNIX like Epoch Timestamps with timezone corrections to UTC | |
' TimeStampEpoch, and date2epoch functions return epoch as fracional decimal values in seconds since epoch | |
'Maintained at:https://gist.github.com/seakintruth/ddcc3d5e400a5083458494ae30d55466 | |
'Dependencies: Windows with "WbemScripting.SWbemDateTime", a default 32bit app | |
'Contributing: Jeremy D. Gerdes<seakintruth@gmail.com>, https://stackoverflow.com/a/22842128 | |
'License: CC-BY-SA 3.0 | |
'Version: 1.0.6 | |
Function TimeStampEpoch() | |
'Returns a time stamp in the format of seconds since epoch | |
' Use this when you need epoch values, from testing, calling Timer() is roughly 10 times faster than calling TimeStampEpoch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extractDomain(data): | |
# Remove protocol part of url | |
data = re.sub(r"^http(s)?\x3a\x2f\x2f", "", str(data), flags=re.IGNORECASE) | |
# Remove part after FQDN | |
data = re.sub(r"\x2f(.*)$", "", str(data), flags=re.IGNORECASE) | |
# Remove port | |
data = re.sub(r"\x3a\d{1,}$", "", str(data), flags=re.IGNORECASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_pretty_timestamp_diff <- function( | |
start_timestamp, | |
end_timestamp, | |
seconds_decimal=2, | |
round_simple=TRUE | |
){ | |
# Set defaults | |
.days_decimal <- 0 | |
.days <- 0 | |
.hours_decimal <- 0 |
OlderNewer