Dashing widget to show the build status of a CircleCI project.
- Get a Circle API Token from your Account Dashboard and set it in your environment as
CIRCLE_CI_AUTH_TOKEN
- Add the
httparty
to your Gemfile and runbundle install
Then:
require 'java' | |
require 'JLink.jar' | |
# Java::ComWolframJlink::KernelLink | |
# http://reference.wolfram.com/mathematica/JLink/ref/java/com/wolfram/jlink/KernelLink.html | |
# http://reference.wolfram.com/mathematica/JLink/ref/java/com/wolfram/jlink/MathLink.html | |
# Java::ComWolframJlink::MathLinkException | |
# Java::ComWolframJlink::MathLinkFactory | |
# http://reference.wolfram.com/mathematica/JLink/ref/java/com/wolfram/jlink/MathLinkFactory.html |
get '/travis/:id/status' do |id| | |
token = "token!!" | |
http = Net::HTTP.new('magnum.travis-ci.com', 443) | |
http.use_ssl = true | |
path = "/Readmill/#{id}.png?token=#{token}" | |
response = http.head(path, nil) | |
if response['Content-Disposition'].include?('failing') | |
@message = "The build failed." |
# config/initializers/tumbz_init.rb | |
Tumbz.configure do |config| | |
config.access_key = "foo" | |
config.access_secret = "bar" | |
end | |
# lib/tumbz.rb | |
module Tumbz | |
def self.configure | |
@options = OpenStruct.new |
#!/bin/bash | |
git checkout master | |
git pull | |
git branch --remotes --merged | grep origin > .master_merged | |
git checkout release-staging | |
git pull | |
git branch --remotes --merged | grep origin > .staging_merged | |
diff .master_merged .staging_merged | |
rm .master_merged .staging_merged |
Dashing widget to show the build status of a CircleCI project.
CIRCLE_CI_AUTH_TOKEN
httparty
to your Gemfile and run bundle install
Then:
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
### spec/serializers/building_spec.rb | |
require "spec_helper" | |
describe BuildingSerializer do | |
include Rails.application.routes.url_helpers | |
let(:room) { create :room } | |
let(:building) { room.building } | |
let(:hash) { BuildingSerializer.new(building).serializable_hash } |
Go has a number of low-level crypto APIs which check off marketing bullet-points (got FIPS supprt, check!) but is missing an high-level API usable by mere mortal programmers. Imagine you want to create a document, sign it and verify that document later. Now check out Go's crypto APIs and give up in frustration after an hour of Googling.
The API should encapsulate a half-dozen common operations and make them as easy as possible. Avoid choice where possible, just pick something reasonably secure in 2014 for me and use it! I'm speaking specifically of a few basic actions (yes, this API is very naive/non-idiomatic), call it crypto/easy
:
// create and persist a keypair to the current directory.
// this is just a one-time operation, now we have a keypair to use.
easy.CreateKeyPair()
rails new
first to generate all of the boilerplate files necessary.rails new .
--css tailwind
as an option on the rails new
call to do this automatically.rails new
will do this automatically but take care if you write any custom SQL that it is SQLite compatible.rails new myapp --devcontainer
but only do this if requested directly.