Skip to content

Instantly share code, notes, and snippets.

View johnsinco's full-sized avatar

John Stewart johnsinco

View GitHub Profile
@nqbao
nqbao / ssm_parameter_store.py
Last active May 29, 2024 06:01
Python class to provide a dictionary-like interface to access AWS SSM Parameter Store easily
# Copyright (c) 2018 Bao Nguyen <b@nqbao.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@jonpugh
jonpugh / git-pull-recursive.rb
Last active October 20, 2021 03:20
Lots of repos? Try "git-pull-recursive" to run "git pull" on all subfolders with a .git folder inside. Thanks to http://snipplr.com/view/62314/perform-git-pull-on-subdirectory-recursive/
# For use in Chef:
# Adds a command: git-pull-recursive
file "/usr/local/bin/git-pull-recursive" do
owner "root"
group "root"
mode "0755"
action :create
content 'find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull" \;'
end
@gnepud
gnepud / test_helper.rb
Created April 6, 2012 08:57 — forked from sethbro/test_helper.rb
MiniTest::Spec with Rails 3.2 setup
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/autorun'
require 'minitest/pride'
require 'capybara/rails'
class MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
@danlamanna
danlamanna / SVN.py
Created November 19, 2011 22:45
Sublime Text 2 - SVN Plugin
import sublime, sublime_plugin
import os, commands
import json, re
import pprint
""" TODO:
- have settings file with username/password/additional flags?
- options menu, per file/folder commands
@asmuth
asmuth / mongoid_prefixable.rb
Created November 6, 2011 22:32
Dynamic (prefixed at runtime) collection names for mongoid models
# uber-hacky dynamic collection names for MongoID models:
#
# class MyModel
# include Mongoid::PrefixableDocument # ...instead of Mongoid::Document
# include Mongoid::Timestamps
#
# field :foobar, :type => Integer
#
# def my_method; 123; end
#