Skip to content

Instantly share code, notes, and snippets.

@ryanmcgary
ryanmcgary / https-rourltransfer.brs
Created April 30, 2022 15:15 — forked from rymawby/https-rourltransfer.brs
Loading data over https using Brightscript and roUrlTransfer
if url.inStr(0, "https") = 0
urlTransfer.setCertificatesFile("common:/certs/ca-bundle.crt")
urlTransfer.initClientCertificates()
end if
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
@ryanmcgary
ryanmcgary / _comment.html.slim
Created June 7, 2021 16:39 — forked from dbridges/_comment.html.slim
Stimulus.js and Rails remote forms with error handling
- # app/views/comments/_comment.html.slim
li data-controller="comment" data-action="click->comment#hello"
= "#{comment.message} by #{comment.user.email}"
@ryanmcgary
ryanmcgary / zip_file_names.rb
Created April 25, 2021 23:21 — forked from rhardih/zip_file_names.rb
Listing filenames of a remote ZIP archive without downloading entire file
require 'httparty'
require 'uri'
def get_file_names(zip_url)
# ZIP file format: https://en.wikipedia.org/wiki/ZIP_(file_format)
# 1. Do an initial head request to figure out how big the file is from the
# content size
response = HTTParty.head(zip_url)
@ryanmcgary
ryanmcgary / ffmpeg.md
Created April 24, 2021 20:27 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@ryanmcgary
ryanmcgary / setup-vagrant-macosx.md
Created March 10, 2021 17:12 — forked from tomysmile/setup-vagrant-macosx.md
How to Install Virtualbox and Vagrant on MacOSX

Install Virtualbox && Vagrant for MacOSX

Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.

$ brew cask install virtualbox

Now install Vagrant either from the website or use homebrew for installing it.

@ryanmcgary
ryanmcgary / capirb.txt
Created March 26, 2019 19:25 — forked from peterkappus/capirb.txt
Quick start for using Capybara in IRB with Chromedriver
# copy and paste this into your terminal to start an IRB session and use Capybara's DSL to write tests interactively
# Thanks to Tom Clements
# http://tom-clements.com/blog/2012/02/25/capybara-on-the-command-line-live-browser-testing-from-irb/
# I prefer using chrome...
# First you need to install the chromedriver https://sites.google.com/a/chromium.org/chromedriver/downloads
# Unzip, and move the executable somewhere in your path...
# e.g.
mv ~/Downloads/chromedriver /usr/local/bin
@ryanmcgary
ryanmcgary / gist:f6d3aa8c75f14178af788face3503ab0
Created November 28, 2018 00:48 — forked from molsches/gist:32fcec2499e95b5b23bc268800e22780
Sample Note for AWS Comprehend Medical
ROS (10 systems)
In addition to that documented in the HPI above, the additional ROS was obtained:
Constitutional: Denies fevers or chills
Eyes: Denies vision changes
ENMT: Denies sore throat
CV: Denies chest pain
Resp: Denies SOB
GI: Denies vomiting or diarrhea
GU: Denies painful urination
MSK: Denies recent trauma
@ryanmcgary
ryanmcgary / Rails model without table
Created October 5, 2018 20:41 — forked from dalibor/Rails model without table
Rails model without table
#In app/models/tableless.rb
class Tableless < ActiveRecord::Base
def self.columns
@columns ||= [];
end
def self.column(name, sql_type = nil, default = nil, null = true)
columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default,
sql_type.to_s, null)
end
@ryanmcgary
ryanmcgary / readme.html
Last active June 17, 2024 11:15 — forked from allewun/remove-watermark.sh
Remove a textual watermark from a PDF file.
zngguvnf's Blog
Processing multiple PDFs using the command line
:linux:
<2017-12-01>
Update [2018-04-17 Tue]
Remove password from pdf
Remove string from pdf
Update [2018-03-30 Fri]: