Skip to content

Instantly share code, notes, and snippets.

View meatballhat's full-sized avatar
🐻
🎷 🐻

Dan Buch meatballhat

🐻
🎷 🐻
View GitHub Profile
#!/usr/bin/env bash
# precise trusty APT package version comparison wheeee
for pkg in $(grep -v :i386 ubuntu-precise); do
if ./bin/travis-compare-package-versions "${pkg}" precise trusty &>/dev/null; then
echo "same: ${pkg}"
else
echo "diff: ${pkg}"
fi
done
#!/usr/bin/env ruby
def main(argv = ARGV)
env_file = argv.fetch(0)
env_dir = argv.fetch(1)
File.readlines(env_file).each do |line|
key, value = line.strip.split('=', 2)
key = key.sub(/^export\s+/, '')
value = value.sub(/^['"]/, '').sub(/['"]$/, '')
@meatballhat
meatballhat / QUESTION.md
Created October 5, 2016 01:12
Travis C++ environment discussion

(originally from @cbeck88 on travis-ci/packer-templates#297 (comment))

Hi, I saw a link to here from travis-ci/travis-ci#6300

At the risk of suggesting something without fully understanding it, let me ask a question about travis "community cookbooks" which I saw here: https://github.com/travis-ci/travis-cookbooks/tree/master/community-cookbooks

It appears to me that some languages have extra cookbooks here, like java, php, and I dimly remember ghc (haskell) being here also when I looked at it first, although I don't see that now.

Would it be helpful if there were community-maintained cookbooks for various versions of gcc / clang? The idea would be to follow gcc / clang dev instructions to build from source, and not link to system standard library like e.g. debian packages do, but an independent instance in home directory. Getting a C++11 conforming standard library is one of the biggest ticket items I would say for C++ support.

#!/usr/bin/env bash
set -o errexit
set -o xtrace
: ${GITHUB_TOKEN:=fababababdadab0000}
BRANCH_NAME="bot-test-$(date -u +%s)"
curl -sf -H "Authorization: token ${GITHUB_TOKEN}" \
https://api.github.com/repos/travis-infrastructure/packer-build/git/refs/heads/master > out.json
#!/usr/bin/env bash
set -o errexit
if ! docker inspect redis &>/dev/null ; then
docker run --name redis -p 6379:6379 -v /tmp:/data -d redis
fi
REDIS_CLI="redis-cli -h ${DOCKER_IP:-$(docker-machine ip default)}"
#!/usr/bin/env bash
set -o errexit
: ${GIT:=git}
__mainremote() {
if [[ "${REMOTE}" ]] ; then
echo "${REMOTE}"
return
fi
[2016-07-14T21:51:46+00:00] INFO: Processing apt_repository[mongodb-3.2] action add (travis_build_environment::mongodb line 23)
[2016-07-14T21:51:47+00:00] INFO: Processing execute[install-key EA312927] action run (/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.15/lib/chef/provider/apt_repository.rb line 201)
[2016-07-14T21:51:47+00:00] INFO: execute[install-key EA312927] ran successfully
[2016-07-14T21:51:47+00:00] INFO: execute[install-key EA312927] sending run action to execute[apt-cache gencaches] (immediate)
[2016-07-14T21:51:47+00:00] INFO: Processing execute[apt-cache gencaches] action run (/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.15/lib/chef/provider/apt_repository.rb line 52)
[2016-07-14T21:51:47+00:00] INFO: execute[apt-cache gencaches] ran successfully
[2016-07-14T21:51:47+00:00] INFO: Processing execute[apt-cache gencaches] action nothing (/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-12.12.15/lib/chef/provider/apt_repository.rb line 52)
[2016-07-14T21:51:47+00:00] INFO: P
[2016-07-14T20:07:44+00:00] INFO: Processing remote_file[/tmp/packer-chef-client/local-mode-cache/cache/system-info.gem] action create (travis_system_info::default line 12)
[2016-07-14T20:07:44+00:00] INFO: remote_file[/tmp/packer-chef-client/local-mode-cache/cache/system-info.gem] created file /tmp/packer-chef-client/local-mode-cache/cache/system-info.gem
[2016-07-14T20:07:44+00:00] INFO: remote_file[/tmp/packer-chef-client/local-mode-cache/cache/system-info.gem] updated file contents /tmp/packer-chef-client/local-mode-cache/cache/system-info.gem
[2016-07-14T20:07:44+00:00] INFO: Processing execute[/opt/chef/embedded/bin/gem install -b "/tmp/packer-chef-client/local-mode-cache/cache/system-info.gem"] action run (travis_system_info::default line 17)
[2016-07-14T20:07:47+00:00] INFO: execute[/opt/chef/embedded/bin/gem install -b "/tmp/packer-chef-client/local-mode-cache/cache/system-info.gem"] ran successfully
[2016-07-14T20:07:47+00:00] INFO: Processing execute[rm -rf /usr/share/travis] action run (travis_sys

Hi! 😸 Here be an example program, example-477.go, written to verify urfave/cli#477 with interactive session and output present as example-477-session-output.txt.

package main
import (
"fmt"
"net/http"
log "github.com/Sirupsen/logrus"
"github.com/codegangsta/negroni"
"github.com/gorilla/mux"
)