Skip to content

Instantly share code, notes, and snippets.

View jbsmith86's full-sized avatar

Joel Smith jbsmith86

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jbsmith86 on github.
  • I am jbsmith86 (https://keybase.io/jbsmith86) on keybase.
  • I have a public key ASAk2D1F9pR4gbmNRy9r6u6FwDP9CiFOs6JEvDB1KHb5igo

To claim this, I am signing this object:

@jbsmith86
jbsmith86 / install-google-fonts.sh
Last active June 13, 2020 04:25 — forked from keeferrourke/install-google-fonts.sh
A bash script to install all Google Fonts, system wide, on debian based systems (ex. Ubuntu)
#!/bin/sh
# Written by: Keefer Rourke <https://krourke.org>
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git>
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git
srcdir="/tmp/google-fonts"
pkgdir="/usr/share/fonts/truetype/google-fonts"
giturl="git://github.com/google/fonts.git"
@jbsmith86
jbsmith86 / cert_vaildation
Last active April 18, 2018 18:30
This script returns the number of days left for validity of the certificate of a given url. Supports wildcard certs and SNI. Useful for monitoring.
#!/usr/bin/env ruby
require "optparse"
require "socket"
require "openssl"
require "time"
options = {
'port' => 443
}
class OfficeAPIError < StandardError; end;
class OfficeAPITimoutError < StandardError
def initialize(msg = "Office API timed out")
super(msg)
end
end
class OfficeAPI
attr_accessor :access_token, :messages_filter, :mail_box, :fetch_from
@jbsmith86
jbsmith86 / gist:a7a3837e324ea4bc34e7
Last active August 29, 2015 14:05
Regex for urls
^(https?:\/\/(www.)?)
@jbsmith86
jbsmith86 / Automatically Create Github Repo
Last active December 7, 2019 06:47
This will create a local git repo inside your current directory and a repo on github and then push it to github. Paste this into a new file (i.e. generate_github_repo.sh) inside your project directory . Run the following: chmod +x ./generate_github_repo.sh This only needs to be done once. now you can start the script with: ./generate_github_repo…
#!/bin/bash
#Replace the empty constants below if you don't want to be prompted for credentials
USERNAME=""
PASSWORD=""
if [ "$USERNAME" == "" ]; then
echo -n "Enter your Github username and press [ENTER]: "
read USERNAME
@jbsmith86
jbsmith86 / Minitest Rails setup
Last active January 3, 2016 09:19
Minitest Rails Setup Instructions
Gemfile add:
group :test do
gem 'minitest-rails-capybara'
end
gem 'minitest-rails'
bundle
rails generate mini_test:install
rails generate mini_test:feature NameOfTest