Skip to content

Instantly share code, notes, and snippets.

@mherb
mherb / CGAL.natvis
Last active March 23, 2020 08:23
Visual Studio natvis for CGAL
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<!-- Surface Mesh -->
<Type Name="CGAL::SM_Index&lt;*&gt;">
<DisplayString>{idx_}</DisplayString>
</Type>
<Type Name="CGAL::Properties::Property_array&lt;*&gt;">
# # # # # # # # # # # # #
# PDF Tools
# # # # # # # # # # # # #
# Uses Imagemagick convert tool
# Reduce PDF file size by compressing images to 200dpi, jpeg quality 80
convert -density 200x200 -quality 80 -compress jpeg input.pdf output.pdf
# Apply contrast normalization to scanned PDF files
@mherb
mherb / safari_cache_clean.scpt
Created September 30, 2012 17:46
Apple Script to clean Safari Cache, History, Webpage Previews, Local Storage and Databases
-- Can be executed from Terminal using "osascript safari_cache_clean.scpt"
-- inspired by http://www.macuser.de/forum/f30/safari-alle-cache-544226/
set appname to "Safari"
if appIsRunning(appname) then
set started to true
-- Quit App
tell application appname to quit
else
@mherb
mherb / inodude.rb
Created February 4, 2012 15:49
Homebrew Formula for a patched version of AVRdude to support auto-resetting Arduino boards for ArduinoISP programming (patch based on a suggestion from http://www.arduino.cc/playground/Code/MegaISP)
require 'formula'
class Inodude < Formula
url 'http://download.savannah.gnu.org/releases/avrdude/avrdude-5.11.1.tar.gz'
homepage 'http://savannah.nongnu.org/projects/avrdude/'
md5 '3a43e288cb32916703b6945e3f260df9'
depends_on 'libusb-compat' if ARGV.include? '--with-usb'
def patches