Skip to content

Instantly share code, notes, and snippets.

@tony-gutierrez
tony-gutierrez / AWS_Single_LetsEncrypt.yaml
Last active March 7, 2024 11:29
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and nginx. http://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too.
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
@OfTheDelmer
OfTheDelmer / classes_lec.md
Last active January 2, 2016 15:09
Lecture Points on Classes

Intro to Classes

Methods, Variables, and All That

Learning Objectives

  • Understand difference between obbjects and classes
  • Understand how objects are referenced
  • Understand getters and setters
  • Understand attr_writer, attr_reader, attr_accessor
  • Understand instance variables and instance methods

Living in the Command Line

Web programmers have to live on the command line. It gives us fast, reliable, and automatable control over computers. Web servers usually don't have graphical interfaces, so we need to interact with them through command line and programmatic interfaces. Once you become comfortable using the command line, staying on the keyboard will also help you keep an uninterrupted flow of work going without the disruption of shifting to the mouse.

Notes before we start

For any command we discuss here, the command man, short for manual, will give a (hopefully) detailed explanation of that command. Sometimes that explanation will be too detailed for you. When you get lost in a man page and you want to understand it, start again from the beginning of of the man page and keep repeating. Hopefully you will get further into the page each time you read it.

Metaphors

The command line is my home. I literally think of using the command line as walking around a building.

Wh

@rsofaer
rsofaer / installfest_steps.md
Last active December 31, 2015 07:09
Steps for installing starting software for GA WDI 2013

GA_Logo

#WDI Installfest

We are going to install the tools necessarily to program with Ruby and Rails on your computer.

If you are on a Mac which is not running the latest version of OSX, please upgrade through the Mac App Store. Apple has made it easier to set up a computer for software development in OSX Mavericks, and keeping the differences between computers to a minimum will help us get everything installed quickly and correctly.

If you are unsure or run into problems during installation, stop and don't worry; We will finish up any of the loose ends on Installfest. Do not try to troubleshoot on your own, you might break your environment further.

@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active March 7, 2024 03:56
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@textarcana
textarcana / git-log2json.sh
Last active March 1, 2024 05:26
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features 😀THIS GIST NOW HAS A FULL GIT REPO: https://github.com/context-driven-testing-toolkit/git-log2json
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'