Skip to content

Instantly share code, notes, and snippets.

View zbeekman's full-sized avatar
🏢
New Office, still neck deep in code

Izaak "Zaak" Beekman zbeekman

🏢
New Office, still neck deep in code
View GitHub Profile
@fernandoaleman
fernandoaleman / gist:5083680
Last active October 17, 2023 12:02
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@rxin
rxin / ramdisk.sh
Last active December 13, 2023 02:40
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@iamatypeofwalrus
iamatypeofwalrus / roll_ipython_in_aws.md
Last active January 22, 2024 11:18
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@jadeatucker
jadeatucker / HOWTODMG.md
Last active April 10, 2024 19:49
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility

@jrsmith3
jrsmith3 / doi2bib.py
Last active January 5, 2024 09:17
Python method to access crossref.org DOI bibtex metadata resolver
import requests
def doi2bib(doi):
"""
Return a bibTeX string of metadata for a given DOI.
"""
url = "http://dx.doi.org/" + doi
headers = {"accept": "application/x-bibtex"}
@kylemanna
kylemanna / README.md
Last active August 29, 2018 12:30
Auto phone home reverse SSH port forwarding on Mac OS X using launchd properly

Attempt to phone home with a reverse ssh tunnel every time the OS X is booted. If ssh crashes or returns, then launchd will restart it in 10 seconds.

Assumptions:

  • The user has a .ssh/config as described below
  • The remote host key has been placed in user's known_hosts file
  • A private ssh key is installed at /Users/user/.ssh/user-home-fwd
  • The remote ssh host has the authorized keys file setup as described below

Place the file @ /Library/LaunchDaemons/phone.home.plist

@minrk
minrk / nbstripout
Last active June 6, 2023 06:23
git pre-commit hook for stripping output from IPython notebooks
#!/usr/bin/env python
"""strip outputs from an IPython Notebook
Opens a notebook, strips its output, and writes the outputless version to the original file.
Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS.
This does mostly the same thing as the `Clear All Output` command in the notebook UI.
LICENSE: Public Domain
@jaytaylor
jaytaylor / cf.sh
Last active March 7, 2023 04:27
CloudFlare command-line DNS management shell script, now with CloudFlare v4 API support!
#!/usr/bin/env bash
##
# @author Jay Taylor [@jtaylor]
# @date 2013-08-15
#
# @description CloudFlare management script.
#
# Path ENV VAR override.
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@ZedThree
ZedThree / fortran-dot-graph.py
Last active February 2, 2023 21:15
Build a dot graph of the Fortran modules in a list of files.
import re
def build_graph(files,exclude=['hdf5','h5lt','mpi']):
"""Build a dot graph of the Fortran modules in a list of files,
excluding modules named in the list exclude"""
# Start the graph
graph = "digraph G {\n"
deps = {}
p = re.compile("^(?:module|program) ([a-zA-Z0-9_]*)",