Skip to content

Instantly share code, notes, and snippets.

View sam0x17's full-sized avatar

Sam Johnson sam0x17

View GitHub Profile
@sam0x17
sam0x17 / ruby_fix.md
Created November 13, 2019 01:36
fix for installing ruby 2.5.x via RVM on macos

Error:

ossl_x509crl.cossl_x509cert.c:334:59: error: member reference type 'int' is not a pointer

Fix:

rvm install 2.5.7 --with-openssl-dir=`brew --prefix openssl`
@sam0x17
sam0x17 / gist:90a52cb74548bb7a47523fe4d41aa101
Created November 15, 2019 18:27
macos v8 install issue fix
https://stackoverflow.com/a/34956689/4245513
@sam0x17
sam0x17 / Gemfile
Created November 17, 2019 15:38
How to get rails' 1.month and 3.seconds etc working in raw ruby
gem 'active_support'
@sam0x17
sam0x17 / macos_fix.md
Last active December 11, 2019 15:29
other macos openssl rvm fix

for me, adding these lines to my .zshrc file fixed it completely:

export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export PKG_CONFIG_PATH="PKG_CONFIG_PATH:/usr/local/opt/[email protected]/lib/pkgconfig"

These lines were in the comments when I ran brew link openssl

It also turned out I had an existing PKG_CONFIG_PATH line set for a previous version of openssl, so I removed that.

@sam0x17
sam0x17 / install.sh
Last active September 28, 2023 15:08 — forked from phillipsj/install.sh
Configure Hyper-V enhanced session support for Ubuntu Budgie 19.10
#!/bin/bash
#
# This script is for Ubuntu Budgie 19.10 to download and install XRDP+XORGXRDP via
# source.
#
if [ "$(id -u)" -ne 0 ]; then
echo 'This script must be run with root privileges' >&2
exit 1
@sam0x17
sam0x17 / dev-setup.sh
Last active January 9, 2020 20:19
Sam's dev environment setup
#!/bin/bash
sudo apt update -y || exit 1
sudo apt upgrade -y || exit 1
curl -sSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash || exit 1
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list || exit 1
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - || exit 1
sudo apt update -y || exit 1
sudo apt install apt-utils p7zip-full zip unzip rar unrar curl wget \
build-essential git gnupg2 openssl libssl-dev sudo zlib1g-dev \
postgresql postgresql-contrib libpq-dev python python-pip nano \
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
@sam0x17
sam0x17 / nitroflare download bandwidth reset time.txt
Created February 21, 2020 00:15
nitroflare download bandwidth reset time
7:00 PM EST
@sam0x17
sam0x17 / amber_db_fix.yml
Last active March 19, 2020 06:31
how to get postgresql to work with amber framework in local domain socket mode
database_url: postgres:///my_db_name
@sam0x17
sam0x17 / js-guide.md
Last active May 19, 2024 03:19
Become a Reddit Mega Soy JS Dev

Become a Reddit Mega Soy JS Dev

  1. Go through the What is web development? w3schools roadmap (just read)
  2. Go through the entire sidebar of the w3schools HTML guide. You'll already be familiar with a good bit of this but there are a lot of new HTML elements including things like <canvas> etc. that it would be good to be vaguely familiar with. Go through some of the quick little exercises for anything you are unfamiliar with but otherwise don't bother.
  3. Same deal with the w3schools CSS guide. There's some really useful stuff in here since CSS 3 came out, and the more you know about it the better. A bunch of it I probbaly don't even know about.
  4. Go through all of the w3schools Javascript guide. Everything here is relevant so you can get a solid foundation.