Skip to content

Instantly share code, notes, and snippets.

View thoraxe's full-sized avatar

Erik Jacobs thoraxe

View GitHub Profile
//*= require_self
@import "bootstrap";
body {
padding-top: 50px;
padding-bottom: 20px;
}
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/providers/redhat/_repos.html.haml (15.3ms)
Completed 200 OK in 1171ms (Views: 15.3ms | ActiveRecord: 36.6ms)
Processing by Katello::ProductsController#toggle_repository as */*
Parameters: {"repo"=>"1", "content_id"=>"168", "releasever"=>"6Server", "basearch"=>"x86_64", "id"=>"6"}
301 Moved Permanently (RestClient::MovedPermanently)
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/resources/cdn.rb:93:in `block in get'
/opt/rh/ruby193/root/usr/share/ruby/net/http.rb:746:in `start'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/resources/cdn.rb:80:in `get'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/util/cdn_var_substitutor.rb:127:in `valid_path?'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/util/cdn_var_substitutor.rb:116:in `valid_substitutions?'
describe "when searching in a specific state", :barn_instate => true do
def set_up_geocode(lat, lng)
fake_geocode = OpenStruct.new(:lat => lat, :lng => lng,
:success => true)
GeoKit::Geocoders::MultiGeocoder.stub(:geocode).and_return(fake_geocode)
end
before do
# we're going to mock/stub the geocoding here since we are only doing
# searching against the mysql db anyway. this way we'll only end up
# geocoding once for looking up the search address
:syslogtag, startswith, "pulp" /var/log/pulp/pulp.log
& ~
ActionController::RoutingError (No route matches [GET] "/pulp/repos/ACME_Corporation/Library/content/dist/rhel/server/6/6Server/x86_64/os/repodata/repomd.xml"):
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
@thoraxe
thoraxe / dec.js
Last active August 29, 2015 14:01
// get the encrypted string which is base64 encoded
var encrypted_string = $("#file-contents").val();
// base64 decode it
var wordarray = CryptoJS.enc.Base64.parse(encrypted_string);
// convert back to AES object
var decryptstring = CryptoJS.enc.Utf16.stringify(wordarray);
// fetch the password - this should be typed into a form.
Processing by Katello::Api::V2::SystemsController#index as JSON
Parameters: {"organization_id"=>"1", "page"=>"1", "search"=>"", "sort_by"=>"name", "sort_order"=>"ASC", "api_version"=>"v2"}
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/systems/index.json.rabl within katello/api/v2/layouts/collection (346.4ms)
Completed 200 OK in 374ms (Views: 344.2ms | ActiveRecord: 4.8ms)
Processing by Katello::EnvironmentsController#registerable_paths as JSON
Parameters: {"organization_id"=>"1"}
Completed 200 OK in 39ms (Views: 0.5ms | ActiveRecord: 4.9ms)
Processing by Katello::Api::V2::SystemsController#show as JSON
Parameters: {"fields"=>"full", "api_version"=>"v2", "id"=>"1b51e9a7-38e2-4a5e-93e3-03d42970f645"}
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/views/katello/api/v2/systems/show.json.rabl within katello/api/v2/layouts/resource (1660.7ms)
$(document).ready(
function() {
$("#cryptojs-encrypt-button").on("click", readSingleFile);
function readSingleFile(event) {
var file = $('#files')[0].files[0];
if (file) {
var reader = new FileReader();
reader.onload = function(file) {
// grab the password the user supplied
var key = $('#encrypt-password').val();
>>> reader.result
ArrayBuffer {}
>>> ab2str(reader.result)
"䥇㡆愹€＀￿￿⇿ᇾ牃慥整⁤楷桴䜠䵉P,�ĀĀ�Ȃń㬀"
>>> ab2str(reader.result).length
28
>>> reader.result.length
undefined
>>> blob = new Blob(ab2str(reader.result))
[Exception... "The method parameter is missing or invalid." code: "0" nsresult: "0x8053001a (TypeError)" location: "<unknown>"] { code=0, message="The method parameter is missing or invalid.", result=2152923162, more...}