Skip to content

Instantly share code, notes, and snippets.

@dumbledore
dumbledore / mount-bitlocker
Created Feb 20, 2018
Mount/umount wrapper for dislocker on MacOS
View mount-bitlocker
#!/bin/bash
BITLOCKER_PARTITION="${1}"
BITLOCKER_PASSWORD="${2}"
function usage() {
echo "$(basename ${0}) <partition> <password>"
echo "Unlocks and mounts a bitlocker partition as read-only"
}
if [ -z "${BITLOCKER_PARTITION}" ]
@dumbledore
dumbledore / gist:636705
Created Oct 20, 2010
Example for using html_safe in Rails 3
View gist:636705
<%= stylesheet_link_tag 'suggest.min' %>
<%= javascript_include_tag 'jquery.min' %>
<%= javascript_include_tag 'suggest.min' %>
<script type="text/javascript">
$(function() {
$("#<%= @search_field %>")
.suggest({
"type": "<%= @type_info %>"
<%= ", \"mql_filter\": [{#{h(@mql_filter)}}]".html_safe unless @mql_filter.nil? %>
})