I hereby claim:
- I am cromulus on github.
- I am bcromie (https://keybase.io/bcromie) on keybase.
- I have a public key whose fingerprint is 2E8D 69FA 9C61 3487 EB49 BE02 6BFC A720 006A B2DE
To claim this, I am signing this object:
function _git_prompt() { | |
local git_status="`git status -unormal 2>&1`" | |
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then | |
if [[ "$git_status" =~ nothing\ to\ commit ]]; then | |
local ansi=42 | |
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then | |
local ansi=43 | |
else | |
local ansi=45 | |
fi |
class Player | |
attr_accessor :previous_health | |
def play_turn(warrior) | |
#warrior.walk!(:forward) | |
if warrior.health < 15 and warrior.feel.empty? | |
warrior.rest! | |
elsif warrior.feel.empty? | |
warrior.walk!(:forward) | |
else | |
warrior.attack!(:forward) |
@bp.route('lang',methods=['GET']) | |
def GET_lang(): | |
""" | |
Returns the language requested by the browser | |
defaults to en-US | |
""" | |
try: | |
headers = self.request.headers | |
return headers['Accept-Language'] || "en-US,en;q=0.8" | |
except Exceptions as e: |
I hereby claim:
To claim this, I am signing this object:
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
## add this to your /etc/sudoers file | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports | |
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports | |
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /Users/bill/.vagrant.d/tmp/hosts.local /etc/hosts | |
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE, VAGRANT_HOSTMANAGER_UPDATE | |
# for vagrant-hostmanager | |
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp <home-directory>/.vagrant.d/tmp/hosts.local /etc/hosts | |
%<admin-group> ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE |
first off, you need a linux machine and must be uid 1000, usually this is the first user created on the system. | |
to find out your id, run this command: `id` | |
Then find a free loop device: | |
``` | |
sudo losetup -f | |
``` | |
usually that will return `loop0` but if not, use whatever it returns in the place of `loop0` in the commands below. | |
next, load the image into the loop device and mount it. |
Write-Host -ForegroundColor green "Bootstrapping machine" | |
Write-Host "Setting up package management and installing required packages for Dev." | |
# | |
# Install Choco (if not already installed) + required packages | |
# | |
if ( (Get-Command "choco" -errorAction SilentlyContinue) ) { | |
Write-Host "Chocolatey already installed. Skipping." | |
} else { |
ubuntu@brlrh01:~$ sudo flynn-host fix --min-hosts 3 --peer-ips 192.168.200.11,192.168.200.12,192.168.200.13 | |
INFO[08-15|20:12:44] found expected hosts n=3 | |
INFO[08-15|20:12:44] ensuring discoverd is running on all hosts | |
INFO[08-15|20:12:44] checking flannel | |
INFO[08-15|20:12:44] flannel looks good | |
INFO[08-15|20:12:44] waiting for discoverd to be available | |
INFO[08-15|20:12:44] checking for running controller API | |
INFO[08-15|20:12:44] found running controller API instances n=2 | |
INFO[08-15|20:12:44] found controller instance, checking critical formations | |
INFO[08-15|20:12:44] checking status of sirenia databases |
# Note: I disabled xmpp in site.yml because of https://github.com/sovereign/sovereign/issues/624 | |
$vagrant destroy -f && vagrant up | |
==> xenial: VM not created. Moving on... | |
==> jessie: Forcing shutdown of VM... | |
==> jessie: Destroying VM and associated drives... | |
Bringing machine 'jessie' up with 'virtualbox' provider... | |
==> jessie: Importing base box 'box-cutter/debian8'... | |
==> jessie: Matching MAC address for NAT networking... | |
==> jessie: Checking if box 'box-cutter/debian8' is up to date... | |
==> jessie: Setting the name of the VM: sovereign_jessie_1481038318155_73409 |