Skip to content

Instantly share code, notes, and snippets.

View jtarchie's full-sized avatar
🖖
spocking along

JT A. jtarchie

🖖
spocking along
View GitHub Profile
@Amit-PivotalLabs
Amit-PivotalLabs / Cleanroom.md
Last active April 8, 2017 21:09
Run sandboxed experiments against a Cloud Foundry deployment

Cleanroom

  • Do you sometimes want to run performance benchmarks, stress/load tests, or security vulnerability probes against a shared integration environment, or even a production environment?
  • Do you worry about polluting these environments, or not leaving any audit trail when things go wrong?

Here are a couple scripts to setup, and later teardown, a cleanroom environment (user, org, space, quota) for doing just these kinds of experiments.

Example

@t2
t2 / birthday_liker.rb
Last active September 23, 2016 14:10
Like and Comment on every 'Happy Birthday' post on your Facebook feed at once.
require 'date'
require 'koala'
class BirthdayLiker
FACEBOOK_TOKEN = 'your_oauth_key'
BIRTHDAY_WORDS = %w(birthday bday birfday birth born)
THANKS_OPTIONS = ['Thank you!', 'Thanks!', 'Appreciate it!']
DATE_TIME_FORMAT = '%Y-%m-%d'
def initialize(birthdate, opts={})
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@thinkerbot
thinkerbot / gem_env.sh
Created November 8, 2010 18:28
Illustrates GEM_HOME vs GEM_PATH
# Two ENV variables control the 'gem' command:
#
# GEM_HOME: the single path to a gem dir where gems are installed
# GEM_PATH: a standard PATH to gem dirs where gems are found
#
# A gem directory is a directory that holds gems. The 'gem' command will lay
# out and utilize the following structure:
#
# bin # installed bin scripts
# cache # .gem files ex: cache/gem_name.gem