Skip to content

Instantly share code, notes, and snippets.

View bdimcheff's full-sized avatar

Brandon Dimcheff bdimcheff

View GitHub Profile
@bdimcheff
bdimcheff / mirror-image.sh
Last active May 11, 2021 14:42 — forked from brandond/mirror-image.sh
mirror go images
#!/bin/bash
FLAGS=""
SOURCE="docker.io/library"
DEST="docker.io/bdimcheff"
IMAGE="golang"
TAG="1.16.4-alpine"
docker buildx imagetools inspect ${SOURCE}/${IMAGE}:${TAG} --raw | \
jq -r '.manifests[] | (.digest + " " + .platform.architecture + .platform.variant)' | \
#! /bin/sh
### BEGIN INIT INFO
# Provides: mongodb
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the mongodb data-store
# Description: starts mongodb using start-stop-daemon
# include this in application controller
module Authentication
protected
# Inclusion hook to make #current_user and #signed_in?
# available as ActionView helper methods.
def self.included(base)
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method
end
# Returns true or false if the user is signed in.
# From http://github.com/jaymcgavren
#
# Save this as rcov.rake in lib/tasks and use rcov:all =>
# to get accurate spec/feature coverage data
require 'cucumber/rake/task'
require 'spec/rake/spectask'
namespace :rcov do
Cucumber::Rake::Task.new(:cucumber) do |t|
# http://www.websudoku.com/?level=4&set_id=470872047
..53.694.
.3.1....6
.......3.
7..9.....
.1..3..2.
.....2..7
.6.......
8....7.5.
.436.81..
@bdimcheff
bdimcheff / joke.rb
Created October 1, 2008 15:35 — forked from trek/joke.rb
while foreigner != terrorist
waterboard(foreigner)
end
imprison(foreigner)