Skip to content

Instantly share code, notes, and snippets.

View DMeechan's full-sized avatar
🧑‍🌾
Building stuff

Daniel Meechan DMeechan

🧑‍🌾
Building stuff
View GitHub Profile
@DMeechan
DMeechan / how-to-change-box-sync-location.md
Last active October 26, 2017 22:13
How to Change Box Sync Default Location on Mac

Overview

After several attempts using the official Box Sync guide for changing the install location folder name (I needed my folder to be called just Box not Box Sync), I gave up on it and turned to Reddit.

It turns out that the solution is ridiculously simple. It's a single command. I fgot it from this Reddit post. By combining the command from the Reddit post with the official guide, we can get Box Sync to point wherever we want, but without needing to set up anything fancy like sym links (as instructed in the Reddit post).

Here's what to do:

  1. Uninstall Box Sync
  2. Follow the official article's steps found here, but do not re-install Box Sync yet
  3. Open up terminal and t
@DMeechan
DMeechan / vs-code-extensions-and-settings.md
Last active October 27, 2017 12:04
My VS Code Extensions & Settings (Visual Studio Code)

The VS Code Extensions & Settings I Use

User interface (themes / icons)

  • vscode-icons (currently using)
  • Tomorrow Night Blue (currently using) (pre-installed with VS Code)
  • Dracula Official
  • Meteor Theme
  • Sapphire Theme
  • rocket-ui
@DMeechan
DMeechan / agnoster.zsh-theme
Last active November 28, 2017 10:53
Remove username@computer from Agonster ZSH Theme
# If just logged on normal user, display a short name like 'Daniel' instead of full user account name like 'dmeechan'
# But if logged in as a different user (like on SSH), display the full username@machine
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
if [[ "$USER" == "YOUR-USER-ACCOUNT-NAME" ]]; then
USER="YOUR-DESIRED-NAME"
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
else
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m"
fi
@DMeechan
DMeechan / update-nodejs-ibm-cloud.sh
Created December 20, 2017 11:47
Updating Node.js on IBM Cloud Delivery Pipeline
#!/bin/bash
# Credit: http://gh-blog.mybluemix.net/blogs/cokeSchlumpf/rethink-it/posts/bluemix/node-buildpipeline.md?cm_sp=dw-bluemix-_-nospace-_-answers
# Paste the script below into IBM Cloud Delivery Pipeline Build process (shell script)
# Set your Node and NVM version:
export NODE_VERSION=8.9.3
export NVM_VERSION=0.33.8
export NVM_DIR=/home/pipeline/nvm
METEOR_HOME=.meteor/local
PATH=$METEOR_HOME/usr/bin:$METEOR_HOME/usr/lib/meteor/bin:$PATH
@DMeechan
DMeechan / setting-input-field.md
Created January 18, 2018 10:48
Setting the value of an input field

$("input[name='username']").setAttribute('value', 'SET-VALUE-HERE')

@DMeechan
DMeechan / meteor-ibm-cloud-guide.md
Last active February 20, 2018 14:18
How to Deploy Meteor on IBM Cloud using DevOps Continuous Delivery Pipeline

How to Deploy Meteor 1.6 on IBM Cloud using DevOps Continuous Deployment Pipeline

Huge thanks to Peter Tuton for his article on Medium. This is based on his work, with some minor modifications to resolve some errors I encountered.

Prerequisites

  1. Download jq 1.5 for Linux from here

  2. Put the jq file in the bin folder in your Meteor project (create the binfolder if it doesn't already exist)

@DMeechan
DMeechan / build.sh
Last active February 20, 2018 14:10
IBM Cloud Meteor 1.6 Build Script
#!/bin/bash
# See guide here:
# https://gist.github.com/DMeechan/25469e18ea9fde342540752002a17d64
METEOR_HOME=.meteor/local
PATH=$METEOR_HOME/usr/bin:$METEOR_HOME/usr/lib/meteor/bin:$PATH
indent() {
c='s/^/ /'
@DMeechan
DMeechan / deploy.sh
Last active February 20, 2018 14:17
IBM Cloud Meteor 1.6 Deploy Script
#!/bin/bash
# See guide here:
# https://gist.github.com/DMeechan/25469e18ea9fde342540752002a17d64
indent() {
c='s/^/ /'
case $(uname) in
Darwin) sed -l "$c";; # mac/bsd sed: -l buffers on line boundaries
*) sed -u "$c";; # unix/gnu sed: -u unbuffered (arbitrary) chunks of data
@DMeechan
DMeechan / fix-libcudart-tensorflow-error.md
Last active May 15, 2018 08:12
Quick and easy way to fix the libcudart.so.8.0 error in TensorFlow

Quick and easy way to fix the libcudart.so.8.0 error in TensorFlow

The error message this fixes:

ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory

Run the command below:

sudo ldconfig /usr/local/cuda/lib64

@DMeechan
DMeechan / playbook-tasks.yml
Last active July 26, 2018 15:12
DevOps Course Chapter 2 - Ansible
---
- hosts: mygroup
become: yes
become_method: sudo
vars:
NODEJS_VERSION: "10"
ansible_become_pass: devops
gecko_version: 0.17.0