Skip to content

Instantly share code, notes, and snippets.

View lushc's full-sized avatar

Chris Lush lushc

View GitHub Profile
@lushc
lushc / gist:7680822
Created November 27, 2013 18:34
Sync an out-dated fork
remote=upstream ; for brname in `git branch -r | grep upstream | grep -v master | grep -v HEAD | sed -e 's/.*\///g'`; do git branch --track $brname $remote/$brname ; done
git pull --rebase --all
git push --all origin
git push --tags origin
@lushc
lushc / gist:8181837
Last active June 20, 2019 11:12
How to fix ffi gem conflict when installing vagrant-librarian-chef
  1. Navigate to C:\HashiCorp\Vagrant\embedded and run msys.bat. This will open a MINGW32 console.
  2. From the MINGW32 consloe run export GEM_HOME=/c:/HashiCorp/Vagrant/embedded/gems; gem list. You should see the ffi gem listed with a version number greater than 1.3.1.
  3. Run gem uninstall ffi
  4. Run gem install ffi -v 1.3.1

This should resolve the "Failed to load the 'vagrant-librarian-chef' plugin" issue, at least for Vagrant 1.3.5 and Chef 11.8.0.

@lushc
lushc / gist:7975bfa05f0590013fdb
Created May 7, 2014 08:38
Fix Virtualbox Guest Additions 4.3.10 incompatibility with Vagrant mounts
vagrant plugin install vagrant-vbguest
vagrant up; vagrant ssh -c 'sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions'; vagrant reload
@lushc
lushc / gist:f9c3b690067730a54b59
Created January 19, 2015 20:09
hd0 out of disk boot error
# grub rescue
set root=(hd0,msdos6)
set prefix=(hd0,msdos6)/boot/grub
insmod normal
normal
# terminal
sudo update-grub
@lushc
lushc / FeatherIcon.js
Last active March 28, 2018 19:39
React component for Feather icons (https://github.com/feathericons/feather)
/**
* @author https://github.com/alexdunne
* @author https://github.com/lushc
*/
import React from "react";
import PropTypes from "prop-types";
import Feather from "feather-icons";
class FeatherIcon extends React.Component {
state = {