Skip to content

Instantly share code, notes, and snippets.

@baseboxorg
baseboxorg / Sierra.md
Created August 11, 2018 01:19 — forked from miku/Sierra.md
MacOS Sierra App Store Link
@baseboxorg
baseboxorg / setup.sh
Created August 10, 2018 10:19 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@baseboxorg
baseboxorg / docker.md
Created August 2, 2018 10:22 — forked from f3l1x/aliases
Docker - installation, tips, commands, aliases

Docker

Shortcuts

$ curl -fsSL https://raw.github.com/tcnksm/docker-alias/master/zshrc >> ~/.bashrc && source ~/.bashrc
# ------------------------------------
@baseboxorg
baseboxorg / gist:148b6f21c60d885f772a740b74f69045
Created June 11, 2018 14:51 — forked from mlhales/gist:5785725
Install OpenCV with Nvidia CUDA, and Homebrew Python support on the Mac.

#OpenCV on the Mac with Nvidia CUDA and Python support using Homebrew

##Prerequisites

  • XCode
  • CUDA
  • Homebrew
    • CMake
    • GCC 4.5+
  • Python
@baseboxorg
baseboxorg / gist:8db797b6f57c6bda41810d9f640479c4
Created June 8, 2018 12:07 — forked from mestizo/gist:9167834
Completely disable IPv6 on OSX
#To Get List of Hardware
sudo networksetup -listallhardwareports
#To Disable IPv6 on Wifi Adapter
sudo networksetup -setv6off wi-fi
#To Disable IPv6 on Built-in Ethernet Adapter
sudo networksetup -setv6off Ethernet
@baseboxorg
baseboxorg / install-docker-ubuntu.md
Created May 2, 2018 21:59 — forked from subfuzion/install-docker-ubuntu.md
Installing Docker on Ubuntu

Installing with apt-get

#!/bin/sh
# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep docker@docker.com || exit 1
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
@baseboxorg
baseboxorg / docker-cleanup
Created May 2, 2018 21:54 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@baseboxorg
baseboxorg / install.sh
Created May 2, 2018 21:53 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@baseboxorg
baseboxorg / duck.sh
Last active April 8, 2018 21:19 — forked from Gilinho/duck.sh
Duckdns cron script
#!/usr/bin/env bash
DUCKPATH=/data/duckdns
TOKEN=changeme
DOMAINS=moo
curl -sSv "https://www.duckdns.org/update?domains=${DOMAINS}&token=${TOKEN}&ip=" \
2>> ${DUCKPATH}/stderr.log \
>> ${DUCKPATH}/stdout.log
printf ' - ' >> ${DUCKPATH}/stdout.log
date >> ${DUCKPATH}/stdout.log
@baseboxorg
baseboxorg / ubuntu_docker.sh
Last active March 29, 2018 17:32 — forked from techiesathya/ubuntu_docker.sh
Installing docker in Ubuntu
#!/bin/bash
# based on tutorial: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
# Command to add GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -