Skip to content

Instantly share code, notes, and snippets.

View rtntdeck's full-sized avatar

Tim rtntdeck

View GitHub Profile
@rtntdeck
rtntdeck / install_tmux.sh
Last active May 2, 2018 20:49
Install Latest TMUX on Centos 7
#!/bin/bash
TMUX_VERSION="tmux-2.7"
#If no existing compiler
sudo yum groupinstall "Development tools"
# Dependencies
sudo yum install libevent
sudo yum install libevent-devel
sudo yum install ncurses-devel
@rtntdeck
rtntdeck / utility_commands.js
Last active February 16, 2018 21:24
Utility JS gists
//Find number of rows in a table with no id
$('table > * > tr').length
//Find number of rows in table with id myTable
$('#myTable > * > tr').length
@rtntdeck
rtntdeck / DBRetrieve.r
Created March 23, 2017 17:33
Standard MySQL DB connection and query function for R.
dbRetrieve = function (dbName, user, password, host, port, sqlQuery){
dbConnection <- dbConnect(
RMySQL::MySQL(),
user = user,
password = password,
host = host,
port = port,
dbname = db
)
@rtntdeck
rtntdeck / combine-gdocs.js
Created March 22, 2017 22:28
This gist combines (merges) several google docs into a single base document. The base document and source documents must exist. The base document will be modified by appending a page break, heading 1 title and the content of the merge documents. Works in GSuite, Google docs and Google drive.
/**
gist will combine/merge the documents listed in docIDS in gsuite, google drive, and google docs.
Does NOT handle headers or footers. Does NOT alter the source documents.
WARNING:
This will permanently alter the 'base' document in docIDs.
docIDs keys can be any text value (except for 'base' which indicates the document being merged into). The key values
are used as a header for each new page.