Skip to content

Instantly share code, notes, and snippets.

@sv99
sv99 / index.html
Created February 13, 2020 20:04 — forked from jdrew1303/index.html
CSS brushed metal
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS brushed metal by Simurai &middot; CodePen</title>
<!--
Copyright (c) 2012 Hugo Giraudel, http://codepen.io/HugoGiraudel
Permission is hereby granted, free of charge, to any person obtaining
@sv99
sv99 / pyenv-install-osx.sh
Created November 17, 2017 19:17 — forked from mtchavez/pyenv-install-osx.sh
Using pyenv to install python on OS X with homebrew dependencies
# 2.7
CFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include -I/usr/local/opt/zlib/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/opt/sqlite/lib -L/usr/local/opt/zlib/lib" \
PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs2" \
pyenv install -v 2.7.12 --force
# 3.x
CFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/opt/sqlite/lib" \
pyenv install -v 3.3.6
@sv99
sv99 / upgrade_packages.R
Last active May 14, 2017 10:20 — forked from bearloga/upgrade_packages.R
The script can be used to re-install packages after upgrading R (on Linux or Mac), since libraries cannot be reused between different minor versions (e.g. when upgrading 3.2.3 to 3.3.2). It detects when a package was installed from CRAN vs GitHub/Git and re-installs it using the appropriate func. Usage: `Rscript upgrade_packages.R`
# General use:
message("Checking for a personal library...")
if (!dir.exists(Sys.getenv("R_LIBS_USER"))) {
warning("Personal library not found, creating one...")
dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)
message("Registering newly created personal library...")
.libPaths(Sys.getenv("R_LIBS_USER"))
} else {
message("Personal library found.")
}

How to share a folder with a docker container on OSX

Mounting shared folders between OSX and the docker container is tricky due to the intermediate boot2docker VM. You can't use the usual docker -v option as the docker server knows nothing about the OSX filesystem - it can only mount folders from the boot2docker filesystem. Fortunately, you can work around this using SSHFS.