Skip to content

Instantly share code, notes, and snippets.

View simonmd's full-sized avatar

Simon Rascovsky MD, M.Sc simonmd

View GitHub Profile
@scarfacedeb
scarfacedeb / 1.form.html.haml
Last active January 18, 2023 22:35
Form with multiple button in rails
/ Form excerpt
= f.button t(".save"), class: "btn"
= f.button t(".publish"), class: "btn", name: "publish"
= f.button t(".test"), class: "btn", name: "test"
@gunlock
gunlock / dcm4chee_run.sh
Last active August 29, 2015 14:05
dcm4chee run script
#!/bin/bash
export JBOSS_HOME=/home/pacs/dcm4chee
JBOSS_CLASSPATH=$JBOSS_HOME/bin/run.jar
JBOSS_NATIVE_DIR="$JBOSS_HOME/bin/native"
JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
#enable remote access to jboss services and web interface
JBOSS_BIND_ADDR=${JBOSS_BIND_ADDR:-"0.0.0.0"}
@gunlock
gunlock / dcm4chee_daemon.sh
Last active August 29, 2015 14:05
dcm4chee daemon script for unbuntu
#!/bin/sh
# Author: Michael Gunlock 2014
### BEGIN INIT INFO
# Provides: dcm4chee
# Required-Start: \$remote_fs \$syslog
# Required-Stop: \$remote_fs \$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@gunlock
gunlock / dcm4chee_install.sh
Last active March 1, 2016 21:56
bash script to install dcm4chee and components on fresh Ubuntu 12.04 image
#!/bin/bash
function usage()
{
echo "Usage: $0 -u <Postgres_Username> -p <Password>"
}
USER=""
@theinventor
theinventor / teamviewer.rb
Created April 1, 2014 17:30
A quick ruby api wrapper for the teamviewer api
module Teamviewer
class Connector
attr_reader :client
def initialize
@client = connection(credentials)
end
@jgautsch
jgautsch / mirth_setup.md
Last active July 28, 2023 12:39
Setting up Mirth Connect for production

Mirth Server Setup

First create ec2 Ubuntu instance

Then install all the things needed for Mirth Connect (following this video: http://www.youtube.com/watch?v=omZyAO2naqs)

# Update Ubuntu
sudo aptitude update

# Safe upgrade of Ubuntu
sudo aptitude safe-upgrade
@TechFounder
TechFounder / simple_form_bootstrap3.rb
Last active January 2, 2016 13:09
Use this configuration in your initializer for simple_form if you're using bootstrap 3. https://github.com/gregbell/active_admin/issues/2703
SimpleForm.setup do |config|
config.input_class = 'form-control'
config.boolean_style = :nested
config.wrappers :bootstrap3, tag: 'div', class: 'form-group', error_class: 'has-error',
defaults: { input_html: { class: 'default_class' } } do |b|
b.use :html5
@cblavier
cblavier / embedded_findable.rb
Last active April 8, 2017 14:30
Helps to override find method for a Mongoid embedded document.
module Mongoid
# Helps to override find method in an embedded document.
# Usage :
# - add to your model "include Mongoid::EmbeddedFindable"
# - override find method with:
# def self.find(id)
# find_through(Book, 'chapter', id)
# end
module EmbeddedFindable
@adamico
adamico / collection_check_boxes_input.rb
Last active September 2, 2025 16:56 — forked from mattclar/simple_form.rb
This fork adds a custom horizontal form wrapper and merges append/prepend in a 'group' wrapper
#app/inputs/collection_check_boxes_input.rb
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput
def item_wrapper_class
"checkbox-inline"
end
end
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active May 30, 2026 13:44
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying