Here's what I did to get things working.
Yep, over at: https://developer.apple.com
Here's what I did to get things working.
Yep, over at: https://developer.apple.com
There are three ways to get puppet modules into Katello. The third way supports git.
#!/bin/bash | |
# @author Adriano Rosa (http://adrianorosa.com) | |
# @date: 2014-05-13 09:43 | |
# | |
# Bash Script to create a new self-signed SSL Certificate | |
# At the end of creating a new Certificate this script will output a few lines | |
# to be copied and placed into NGINX site conf | |
# | |
# USAGE: this command will ask for the certificate name and number in days it will expire |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
On the Refinery29 Mobile Web Team, codenamed "Bicycle", all of our unit tests are written using Jasmine, an awesome BDD library written by Pivotal Labs. We recently switched how we set up data for tests from declaring and assigning to closures, to assigning properties to each test case's this
object, and we've seen some awesome benefits from doing such.
Up until recently, a typical unit test for us looked something like this:
describe('views.Card', function() {
seed_data = [ | |
{model_name: "somename", image:"my_image.jpg"}, | |
#... | |
] | |
thin_server = Thread.start do | |
Thin::Server.start('0.0.0.0', 4567) do | |
run Rack::Directory.new( File.join(Dir.pwd,"seed-images") ) | |
end | |
end |
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :app, :except => { :no_release => true } do | |
system("bundle check"); exit if $? != 0 | |
system("RAILS_ENV=#{stage} bundle exec rake assets:precompile"); exit if $? != 0 | |
servers = find_servers :roles => :web, :except => { :no_release => true } | |
run <<-CMD.compact | |
cp -- #{shared_manifest_path.shellescape} #{current_path.to_s.shellescape}/assets_manifest#{File.extname(shared_manifest_path)} | |
CMD |
require 'active_support/core_ext/time' | |
class BusinessHoursFeature | |
# This feature is only available between the hours of 10am and 4pm | |
def enabled? | |
Time.use_zone('Pacific Time (US & Canada)') do | |
now = Time.zone.now | |
am, pm = Time.zone.parse('10:00'), Time.zone.parse('16:00') | |
weekday = !(now.saturday? || now.sunday?) |
# Call scopes directly from your URL params: | |
# | |
# @products = Product.filter(params.slice(:status, :location, :starts_with)) | |
module Filterable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Call the class methods with names based on the keys in <tt>filtering_params</tt> | |
# with their associated values. For example, "{ status: 'delayed' }" would call |
# db/migrate/XXXXXXXXXXXXX_add_authentication_token_to_users.rb | |
class AddAuthenticationTokenToUsers < ActiveRecord::Migration | |
def change | |
add_column :users, :authentication_token, :string | |
add_index :users, :authentication_token, :unique => true | |
end | |
end |