This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: simple-volume-pod | |
spec: | |
# Volumes are declared by the pod. They share its lifecycle | |
# and are communal across containers. | |
volumes: | |
# Volumes have a name and configuration based on the type of volume. | |
# In this example, we use the emptyDir volume type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Complete thor tasks script for bash | |
# Save it somewhere and then add | |
# complete -C path/to/script -o default thor | |
# to your ~/.bashrc | |
require 'fileutils' | |
THORFILES = ['thorfile', 'Thorfile', 'thorfile.rb', 'Thorfile.rb', '*.thor'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'octokit' # gem install octokit | |
page = 1 | |
catch(:done) do | |
while (repositories = Octokit.repositories('railscasts', page: page, per_page: 100, sorted: 'created', direction: 'desc')).length > 0 | |
repositories.each do |repository| | |
throw :done if File.exist? repository.name | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A quick and dirty implementation of an HTTP proxy server in Ruby | |
# because I did not want to install anything. | |
# | |
# Copyright (C) 2009 Torsten Becker <torsten.becker@gmail.com> | |
require 'socket' | |
require 'uri' | |