Skip to content

Instantly share code, notes, and snippets.

View vinyar's full-sized avatar

Mr. Pacman vinyar

  • Launch Consulting
  • Seattle
View GitHub Profile
@vinyar
vinyar / gemrc.erb
Last active August 29, 2015 14:06 — forked from charlesjohnson/gemrc.erb
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
@vinyar
vinyar / vagrantfile.rb
Created September 29, 2014 22:39
Vagrant file for working on VPN
# -*- mode: ruby -*-
# vi: set ft=ruby :
cookbook_name = "centrify"
box = "windows2008r2"
box_url = "http://bla.com/windows2008r2.box"
hostname = "server_name"
Vagrant.configure("2") do |config|
#config.omnibus.chef_version = :latest
@vinyar
vinyar / Vagrantfile.rb
Last active August 29, 2015 14:09
Vagrant blob for blog
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "alex_rocks"
# config.vm.synced_folder "../../stuff_for_windows", "c:/mount_point"
config.vm.guest = :windows
# New veature in vagrant 1.6. Makes windows much easier.
@vinyar
vinyar / gist:50649216b131837a3a29
Last active August 29, 2015 14:09
certify pains that make you want to throw large objects

When creating expense

  • All of the expenses need currency specified individually. There is no way to specify currently at the expense report level.
  • Location should be definable at the Expense level and persist through all of the receipts. Currently have to specify location on each receipt. Super time waster.
  • No ability to rearrange items within a day to reflect the actual flow of events.
  • No ability to flag expenses as "follow up" or "double check of accuracy"
  • The app flags same value transactions as potentially duplicates even when they have different receipts attached, took place in different cities, or generally have fundamentally different characteristics. 
  • No way to accept flagged transactions as 'not duplicate'.
  • When pressing 'cancel' Website presents a completely useless dialog box prompting - "are you sure you want to cancel" even though no changes have been made and data is already saved. There is no reason to ask a user if they're sure since there is no risk of data loss. Useless 'fe
@vinyar
vinyar / user_data.ps1
Last active November 7, 2016 05:30
powershell userdata to send to AWS Windows boxes to configure for Windows Fundamentals - in case cloudshare throws a tantrum.
<powershell>
#https://gist.github.com/vinyar/6735863;
# below two commands are known to fail for arbitrary reasons
try { winrm quickconfig -q }
catch {write-host "winrm quickconfig failed"}
try { Enable-PSRemoting -force}
catch {write-host "Enable-PSRemoting -force failed"}
#####################################################
powershell_script "Install IIS" do
code "add-windowsfeature Web-Server"
action :run
end
service "w3svc" do
action [:enable, :start ]
end
#node.default["iis_demo"]["indexfile"] = "Default2.htm"
$ sudo chef-apply -e "package 'tree'" -l debug
[2014-12-01T05:37:38-08:00] DEBUG: Building node object for xxx.local
[2014-12-01T05:37:38-08:00] DEBUG: Extracting run list from JSON attributes provided on command line
[2014-12-01T05:37:38-08:00] DEBUG: Applying attributes from json file
[2014-12-01T05:37:38-08:00] DEBUG: Platform is mac_os_x version 10.9.5
[2014-12-01T05:37:38-08:00] INFO: Run List is []
[2014-12-01T05:37:38-08:00] INFO: Run List expands to []
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* package[tree] action install[2014-12-01T05:37:38-08:00] INFO: Processing package[tree] action install ((chef-apply cookbook)::(chef-apply recipe) line 1)
@vinyar
vinyar / output.rb
Created December 24, 2014 04:45
chef gem install knife-windows output on windows
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\Administrator> gem install knife-windows
Fetching: gssapi-1.0.3.gem (100%)
Fetching: httpclient-2.5.3.3.gem (100%)
Fetching: mini_portile-0.6.1.gem (100%)
Fetching: nokogiri-1.6.5-x86-mingw32.gem (100%)
Nokogiri is built with the packaged libraries: libxml2-2.9.2, libxslt-1.1.28, zlib-1.2.8, libiconv-1.14.
Fetching: rubyntlm-0.1.1.gem (100%)
@vinyar
vinyar / kitchen converge.rb
Created January 6, 2015 09:34
Test Kitchen 1.3
alexvinyar@seavinyar02 ~/Documents/Projects/win_wsus (master●●)$ kitchen create
-----> Starting Kitchen (v1.3.0)
-----> Creating <domain-controller-windows-2008R2>...
Bringing machine 'default' up with 'virtualbox' provider...
default: The Berkshelf shelf is at "/Users/alexvinyar/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150106-38311-1v8go4-default"
==> default: VirtualBox VM is already running.
Vagrant instance <domain-controller-windows-2008R2> created.
Finished creating <domain-controller-windows-2008R2> (0m6.60s).
-----> Kitchen is finished. (0m7.58s)
alexvinyar@seavinyar02 ~/Documents/Projects/win_wsus (master●●)$ kitchen converge
@vinyar
vinyar / output.rb
Created January 6, 2015 11:17
Chef verify failure on clean ChefDK installation on OSX 10.9.5
$ chef verify
Running verification for component 'berkshelf'
Running verification for component 'test-kitchen'
Running verification for component 'chef-client'
Running verification for component 'chef-dk'
Running verification for component 'chefspec'
....
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chefspec-4.2.0.beta.1/lib/chefspec/berkshelf.rb:4:in `rescue in <top (required)>': I could not load the 'Berkshelf' gem! You must have the gem installed (ChefSpec::Error::GemLoadError)
on your local system before you can use the berkshelf plugin.