Skip to content

Instantly share code, notes, and snippets.

@dnozay
dnozay / _Jenkins+Script+Console.md
Last active June 5, 2024 17:43
jenkins groovy scripts collection.
@smagch
smagch / .dockerignore
Last active November 19, 2022 16:53
AWS: CloudFormation with Elastic Beanstalk, Docker Go web app.
.git
@Taluu
Taluu / MockEntityManager.php
Last active February 18, 2023 16:59
Mock some services for PHPUnit
<?php
namespace Traits\Tests;
/**
* Mocks the entity manager
*
* Provides everything in the memory, so the tests does not depend on doctrine,
* which does a lot of stuff (maybe too much). This also allows to avoid to
* need and modify the data in the database, even if those are for the tests.
@przygode
przygode / gist:3925522
Created October 21, 2012 02:41
auto-scaling complete configuration
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AppServer Stack",
"Parameters": {
"KeyName": {
"Type": "String",
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the web server",
"Default": "AWS_SSH_KEY"
},
"InstanceType": {
@matschaffer
matschaffer / create_data_bag.rb
Created June 8, 2012 15:30
Creating local encrypted data bags
require 'rubygems'
require 'chef/encrypted_data_bag_item'
secret = Chef::EncryptedDataBagItem.load_secret('data_bag_key')
data = {"id" => "mysql", "root" => "some secret password"}
encrypted_data = Chef::EncryptedDataBagItem.encrypt_data_bag_item(data, secret)
FileUtils.mkpath('data_bags/passwords')
File.open('data_bags/passwords/mysql.json', 'w') do |f|
f.print encrypted_data.to_json
@mislav
mislav / deploy.rb
Created June 12, 2009 13:04
Thor task for easier hotfixes with Capistrano & git (instructions below)
# copy to your Capistrano recipe file
namespace :deploy do
task :clear_cached_assets, :roles => :web do
dir = "#{current_release}/public"
run %(rm #{dir}/javascripts/all.js #{dir}/stylesheets/master.css)
end
end