Skip to content

Instantly share code, notes, and snippets.

@pwgerman
pwgerman / soffice
Created Oct 8, 2016
LibreOffice terminal launch command /usr/local/bin/soffice
View soffice
#!/bin/bash
# Need to do this because symlink won't work
# It complains about some .plist files
/Applications/LibreOffice.app/Contents/MacOS/soffice "$@"
# Example to convert an excel file to pdf
# $ soffice --headless --convert-to pdf:"calc_pdf_Export" /path/to/some/.xlsx/ file
~
@pwgerman
pwgerman / git_notebook.ipynb
Created Jan 24, 2016
Introduction to using Git with Jupyter Notebooks
View git_notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pwgerman
pwgerman / install_new_package.sh
Created Dec 18, 2015 — forked from michaelaye/install_new_package.sh
My procedure for (Ana/Mini)conda users for installing new packages.
View install_new_package.sh
# set package_name, replace SpiceyPy with what you need.
PACKAGE_NAME = SpiceyPy
# First make sure you have activated the conda env where you want `package_name` installed
source activate myenv
# Then update pip to newest versions, as they are usually better in handling uninstalls:
conda update pip
# Now check if `package_name` is in conda:
conda install $PACKAGE_NAME
# if not, check if it's on pypi:
pip install $PACKAGE_NAME
@pwgerman
pwgerman / Word Emacs Key bindings
Created May 15, 2015
A VBA macro to set up Emacs keybindings in MS Word
View Word Emacs Key bindings
Attribute VB_Name = "NewMacros"
Sub EmacsCustomKeybind()
Attribute EmacsCustomKeybind.VB_Description = "Assigns emacs and other useful keybindings to Keyboard Customization."
Attribute EmacsCustomKeybind.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.Emacs1"
'
' Emacs1 Macro
' Assigns emacs and other useful keybindings to Keyboard Customization.
'
CustomizationContext = NormalTemplate
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyB, wdKeyOption, wdKeyControl), _
@pwgerman
pwgerman / bashrc_osx
Created May 15, 2015
personal ~/.bashrc for OSX
View bashrc_osx
#!/bin/bash
# Mac OSX ~/.bashrc
# For this to automatically load on Mac, .bashrc must be called in .bashprofile, or type 'bash' to launch .bashrc
alias unhide='defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder'
alias hide='defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder'
alias top='top -s1 -o mem -R -F'
You can’t perform that action at this time.