This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Received: from mail-qt1-f169.google.com (unknown [209.85.160.169])\tby relay-3.us-west-2.relay-prod (Postfix) with ESMTPS id AD07B20983\tfor <support@to.example.com>; Sat, 03 Apr 2021 18:30:25 +0000\r\nReceived: by mail-qt1-f169.google.com with SMTP id i19so5801578qtv.7 for <support@to.example.com>; Sat, 03 Apr 2021 11:30:25 -0700\r\nReceived: from bills-macbookpro.localdomain (cpe-66-108-12-213.nyc.res.rr.com. [66.108.12.213]) by smtp.gmail.com with ESMTPSA id x14sm9745469qkx.112.2021.04.03.11.30.23 for <support@to.example.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Apr 2021 11:30:24 -0700\r\nDate: Sat, 03 Apr 2021 14:30:27 -0400\r\nFrom: Bill Cromie <bill@from.example.com>\r\nTo: support@to.example.com\r\nMessage-ID: <7AFF8C6A-8AFA-44BD-B706-8BED3E85880B@from.example.com>\r\nMime-Version: 1.0\r\nContent-Type: multipart/alternative;\r\n boundary=\"Apple-Mail=_2E848F61-C9CF-4F12-86DF-43037582E1F8\"\r\nContent-Transfer-Encoding: 7bit\r\nDKIM-Sign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_ip(hostname) | |
dns = Resolv.new | |
redis = Redis.new # storing in redis | |
ip = redis.get("ip:#{hostname}") | |
return ip unless ip.nil? | |
begin | |
resource = dns.getresource(hostname, Resolv::DNS::Resource::IN::A) | |
rescue Resolv::ResolvError | |
return false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open("/vagrant/vendor/bundle/ruby/1.9.1/gems/activesupport-2.3.17/lib/active_support/core_ext/time.rb", O_RDONLY) = 7 | |
fstat(7, {st_mode=S_IFREG|0644, st_size=1528, ...}) = 0 | |
ioctl(7, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff01c20f58) = -1 ENOTTY (Inappropriate ioctl for device) | |
fstat(7, {st_mode=S_IFREG|0644, st_size=1528, ...}) = 0 | |
read(7, "require 'date'\nrequire 'time'\n\nc"..., 8192) = 1528 | |
read(7, "", 8192) = 0 | |
close(7) = 0 | |
lstat("/vagrant", {st_mode=S_IFDIR|0755, st_size=1666, ...}) = 0 | |
lstat("/vagrant/vendor", {st_mode=S_IFDIR|0755, st_size=136, ...}) = 0 | |
lstat("/vagrant/vendor/bundle", {st_mode=S_IFDIR|0755, st_size=102, ...}) = 0 |
NewerOlder