Skip to content

Instantly share code, notes, and snippets.

View djrobby's full-sized avatar

Robby Dhillon djrobby

  • Detroit, MI - USA
View GitHub Profile
@djrobby
djrobby / sqlite_intro.sql
Created April 5, 2021 11:06 — forked from leondutoit/sqlite_intro.sql
sqlite things
-- this is a random comment
-- anything prefixed by two dashes is a comment
-- and will not be executed by the database
-- to start the interactive session on the command prompt
-- type: $ sqlite3
-- something will be printed and then you'll see another prompt like this
-- sqlite>
@djrobby
djrobby / sqlite_to_json.sql
Created April 5, 2021 11:10 — forked from akehrer/sqlite_to_json.sql
SQLite Results as JSON using the SQLite JSON1 extension
-- When SQLite is compiled with the JSON1 extensions it provides builtin tools
-- for manipulating JSON data stored in the database.
-- This is a gist showing SQLite return query data as a JSON object.
-- https://www.sqlite.org/json1.html
-- An example table with some data
CREATE TABLE users (
id INTEGER PRIMARY KEY NOT NULL,
full_name TEXT NOT NULL,
email TEXT NOT NULL,
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 8c04cb5..132d803 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -104,6 +104,9 @@
have_func("SSLv2_method")
have_func("SSLv2_server_method")
have_func("SSLv2_client_method")
+have_func("SSLv3_method")
+have_func("SSLv3_server_method")
@djrobby
djrobby / openssl_tls_1.2.patch
Created April 9, 2021 13:14 — forked from crftr/openssl_tls_1.2.patch
Source patch to add support to TLS 1.1 and 1.2 to Ruby 1.9.3
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -107,6 +107,18 @@
OSSL_SSL_METHOD_ENTRY(TLSv1),
OSSL_SSL_METHOD_ENTRY(TLSv1_server),
OSSL_SSL_METHOD_ENTRY(TLSv1_client),
+#if defined(HAVE_TLSV1_2_METHOD) && defined(HAVE_TLSV1_2_SERVER_METHOD) && \
+ defined(HAVE_TLSV1_2_CLIENT_METHOD)
+ OSSL_SSL_METHOD_ENTRY(TLSv1_2),
@djrobby
djrobby / vps-mn-boostratp-prep.sh
Created April 12, 2021 12:17 — forked from thephez/vps-mn-boostratp-prep.sh
Vultr boot startup script - mn-bootstrap prep
#!/bin/sh
# Based on instructions from
# https://docs.dash.org/en/stable/masternodes/setup-testnet.html
#
# See https://www.vultr.com/docs/vultr-startup-scripts-quickstart-guide
# for details of using Vultr startup scripts
# Add new user
USERNAME=yourusernamehere # Username to create
@djrobby
djrobby / deploy.sh
Created April 12, 2021 12:25 — forked from KaiserKatze/deploy.sh
Server initialization script for newly created Vultr VPS instances
#!/bin/bash
cat << EOF
#=============================================================================#
# Startup Boot Script #
# --------------------------------------------------------------------------- #
# Platform : Vultr VPS (Debian 9) #
# Author : KaiserKatze <[email protected]> #
# --------------------------------------------------------------------------- #
# This startup script is saved to `/tmp/firstboot.exec` after execution. #
@djrobby
djrobby / Vultr Ubuntu startup script.sh
Created April 12, 2021 12:28 — forked from stvhwrd/Vultr Ubuntu startup script.sh
Setting up a general web dev Ubuntu VPS
# Startup script for Ubuntu 17.04 VPS on Vultr (Dev machine and cloud server)
# add a new user @todo: make this a one-liner
# adduser stvhwrd
# usermod -aG sudo stvhwrd
## MANUALLY LOG OUT AS ROOT AND LOG IN AS NEW USER
# OPTIONAL: to add ssh key, assuming that you have ssh-copy-id installed on local machine and your keypair is in ~/.ssh and named id_rsa:
# Locally, i.e. on your laptop. eg. ssh-copy-id [email protected]
@djrobby
djrobby / 1.9.3-p551.patch
Created April 12, 2021 14:26 — forked from cybniv/1.9.3-p551.patch
1.9.3-p551 patch (SSLv3, TLS 1.1/2 support, CVE-2015-1855 fix backport)
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index bfb1ea4..eaa2557 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -104,6 +104,15 @@ have_func("OPENSSL_cleanse")
have_func("SSLv2_method")
have_func("SSLv2_server_method")
have_func("SSLv2_client_method")
+have_func("SSLv3_method")
+have_func("SSLv3_server_method")
@djrobby
djrobby / .bashrc
Created April 13, 2021 17:10 — forked from kshep92/.bashrc
Some handy functions for managing NginX
alias nx='/bin/bash ~/.scripts/nx.sh' # NginX scripts
@djrobby
djrobby / vips.sh
Last active April 25, 2022 20:23 — forked from yellow1912/vips.sh
Install libvips on Ubuntu
#!/bin/bash
#https://www.libvips.org/install.html
VERSION="8.12.2"
echo ""
echo "---------------------------------"
echo "| AUTO COMPILE LIBVIPS |"
echo "---------------------------------"
echo ""
echo "-----------------------"
echo "Installing cgif"