Skip to content

Instantly share code, notes, and snippets.

View zzip's full-sized avatar

Dale Hofkens zzip

  • Valid Solutions
  • Belgium
View GitHub Profile
@zzip
zzip / put_to_s3.sh
Last active July 16, 2025 10:12 — forked from gbhorwood/put_to_s3.sh
upload file to s3 bash script
#!/bin/bash
####
# Upload one file to configured S3 bucket
#
# 20240418 gbh
#
# Accepts the path to the file to upload as its only command-line argument. Uploads
# to the S3 bucket configured in the 'Configuration' block below.
#
@zzip
zzip / active_resource_spy.rb
Created March 4, 2012 18:35
ActiveResource Spy
class ActiveResource::Connection
# Creates new Net::HTTP instance for communication with
# remote service and resources.
def http
http = Net::HTTP.new(@site.host, @site.port)
http.use_ssl = @site.is_a?(URI::HTTPS)
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl?
http.read_timeout = @timeout if @timeout
<div id="taxonomies" class="sidebar-item">
<% @taxonomies.each do |taxonomy| %>
<h3>Shop by <%= taxonomy.name.singularize %></h3>
<ul class="navigation-list">
<% taxonomies = taxonomy.root.children.find (:all,
:select => "DISTINCT taxons.*",
:joins => :products,
:conditions => ["products.available_on <= ? and products.deleted_at is null", Time.zone.now] )
%>
<% taxonomies.each do |taxon| %>