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
I created a folder for vagrant, edited Vagrantfile, created a cookbooks folder and | |
git clone https://github.com/opscode-cookbooks/mysql.git | |
git clone https://github.com/opscode-cookbooks/build-essential.git | |
git clone https://github.com/opscode-cookbooks/openssl.git | |
and then vagrant up but chef failed. | |
[2012-11-08T14:52:50+00:00] INFO: *** Chef 10.14.2 *** | |
[2012-11-08T14:52:50+00:00] INFO: Setting the run_list to ["recipe[build-essential]", "recipe[openssl]", "recipe[mysql]", "recipe[mysql::client]", "recipe[mysql::server]"] from JSON | |
[2012-11-08T14:52:50+00:00] INFO: Run List is [recipe[build-essential], recipe[openssl], recipe[mysql], recipe[mysql::client], recipe[mysql::server]] | |
[2012-11-08T14:52:50+00:00] INFO: Run List expands to [build-essential, openssl, mysql, mysql::client, mysql::server] |
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
//this .observers is a scala.collection.immutable.$colon$colon according to IntelliJ reflection | |
Observable.localState(state).observers.foreach(o => { | |
//insert accountName into each record. | |
println(o) //works | |
val accountName = o.accountName // produces compile error | |
val newRecordsWithAccountName = ArrayBuffer.empty[Record] | |
newRecords.foreach(aRecord => { | |
//where i will make a new Record object which includes accountName value |
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
2014-03-19 06:36:48 DEBUG [qtp1444302650-1149] anonymous org.sonatype.nexus.plugins.ruby.proxy.DefaultProxyRubyRepository - rubygems retrieveItem() :: FOUND rubygems:/prerelease_specs.4.8.gz | |
2014-03-19 06:36:49 DEBUG [qtp1444302650-1149] anonymous org.sonatype.nexus.plugins.ruby.proxy.DefaultProxyRubyRepository - getTargetsForRequest() :: rubygems:quick/Marshal.4.8/ruby-mysql-2.9.0.gemspec.rz | |
2014-03-19 06:36:49 DEBUG [qtp1444302650-1149] anonymous org.sonatype.nexus.proxy.targets.DefaultTargetRegistry - Resolving targets for repository='rubygems' for path='quick/Marshal.4.8/ruby-mysql-2.9.0.gemspec.rz' | |
2014-03-19 06:36:49 DEBUG [qtp1444302650-1149] anonymous org.sonatype.nexus.plugins.ruby.proxy.DefaultProxyRubyRepository - rubygems.retrieveItem() :: ResourceStoreRequest{requestPath='quick/Marshal.4.8/ruby-mysql-2.9.0.gemspec.rz', requestContext=RequestContext{this={request.remoteOnly=false, request.localOnly=false}, parent=null}, pathStack=[], processedRepositories=[], appliedMappings={}} | |
2014-03-19 06:36:4 |
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
WARNING: chef-dk currently depends on Ruby >= 2.0 , so these steps are mostly just in-case we have to fall-back and make chef-dk work on Ruby 1.9.3 someday. | |
Pre-req: you might have to sanitize a pre-existing ruby and git environment. | |
Reset PATH environment variable to exclude any \Git\bin folders or other “unix utils” which may pollute your dev environment. It may seem all okay until you get 20 minutes into a compile and tar.exe takes a stackdump. | |
Install ruby 1.9.3 and devkit. I used Chocolatey Nuget package manager. | |
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin | |
cinst git.install -notSilent | |
DO elect to adjust path to “Run Git from the Windows Command Prompt” |
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
<?xml version="1.0"?> | |
<!-- | |
This file contains some false positive bugs detected by Findbugs. Their | |
false positive nature has been analyzed individually and they have been | |
put here to instruct Findbugs it must ignore them. | |
Reference: | |
This file format: http://findbugs.sourceforge.net/manual/filter.html | |
Bug pattern names and codes: http://findbugs.sourceforge.net/bugDescriptions.html | |
Bug categories: https://code.google.com/p/findbugs/source/browse/findbugs/etc/findbugs.xml |
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
# If on windows, you may need to download some custom python wheels for libxml and xmlsec | |
APP_VENV_PATH ?= ../python-venv | |
ifeq ($(OS),Windows_NT) | |
VENV_PATH_BIN := $(addsuffix /Scripts,$(APP_VENV_PATH)) | |
else | |
VENV_PATH_BIN := $(addsuffix /bin,$(APP_VENV_PATH)) | |
endif | |
default: install-dev |
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
#!/bin/bash | |
#By installing the Amazon Inspector Agent, you agree that your use is | |
# subject to the terms of your existing AWS Customer Agreement or other | |
# agreement with Amazon Web Services, Inc. or its affiliates governing your | |
# use of AWS services. You may not install and use the | |
# Amazon Inspector Agent unless you have an account in good standing with AWS. | |
# Copyright 2016 Amazon Web Services, Inc. or its affiliates. All Rights Reserved. | |
# Licensed under the terms of your existing AWS Customer Agreement |
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
# Great answer by Danila Ganchar at https://stackoverflow.com/questions/47900727/mock-authentication-decorator-in-unittesting | |
# mock out check_auth decorator | |
from functools import wraps | |
from unittest.mock import patch | |
def mock_decorator(*args): | |
def decorator(f): |
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
#!/bin/bash | |
if [ ! -d .venv ]; then | |
python3 -m virtualenv .venv | |
source .venv/bin/activate | |
pip install flake8 | |
else | |
source .venv/bin/activate | |
fi | |
CMD="flake8 --exclude .venv,.git,__pycache__ | tee flake_out.txt" |