Skip to content

Instantly share code, notes, and snippets.

@dumbledore
dumbledore / mount-bitlocker
Created February 20, 2018 21:05
Mount/umount wrapper for dislocker on MacOS
#!/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 October 20, 2010 16:02
Example for using html_safe in Rails 3
<%= 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? %>
})