Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomas D'Stefano tomas-stefano

  • Ministry of Justice
  • London
View GitHub Profile
@tomas-stefano
tomas-stefano / Gemfile
Last active Jun 4, 2020
DEFRA to MoJ metadata (a simple version)
View Gemfile
gem 'rspec'
@tomas-stefano
tomas-stefano / read_session.rb
Last active Jul 21, 2017
Read yaml/erb files
View read_session.rb
session_config_file = File.read('config/session_expiration.yml')
session_config = YAML.load(ERB.new(session_config_file).result(binding))
session_config['expiration_time'] # => 1800 seconds (30 minutes)
@tomas-stefano
tomas-stefano / karma.txt
Created Jul 17, 2017
Notes. It is about karma
View karma.txt
Install karma-cli globally:
* npm i -g karma-cli
Set up the project:
* npm init
* npm i --save-dev karma
* karma init
* Use the following responses when prompted:
* Which testing framework do you want to use?
* mocha
View rubocop.yml
Documentation:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Metrics/LineLength:
Max: 80
Metrics/MethodLength:
Max: 15
Metrics/ModuleLength:
Exclude:
@tomas-stefano
tomas-stefano / Gemfile
Last active May 30, 2017
PRs list from mas
View Gemfile
gem 'octokit'
@tomas-stefano
tomas-stefano / install_deis.sh
Last active Oct 28, 2016
Simple script to install Deis locally with vagrant
View install_deis.sh
# All this commands are listed on the docs
# I just put everything together.
git clone https://github.com/deis/deis.git
cd deis/
git checkout v1.7.3
# make sure you have access to https://discovery.etcd.io/
make discovery-url
# After running the command above, make sure that you have
View My OSX-10.10-setup.md

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@tomas-stefano
tomas-stefano / Gemfile
Last active Aug 29, 2015
Codebar student Capybara selenium browser starts
View Gemfile
source 'http://rubygems.org'
gem 'rspec'
gem 'capybara'
gem 'selenium-webdriver'
gem 'site_prism'
@tomas-stefano
tomas-stefano / Readme.md
Last active Jun 6, 2019
Pre commit ruby script
View Readme.md

Pre-commit hook

This is a pre-commit script that will see the git diff and run the appropriate checks like JSHint and Rubocop

You can add to your .git/hooks of any repo that you like.

Notes

  1. Don't forget to add the executable permission to this file and have the following installed:
@tomas-stefano
tomas-stefano / developers.rb
Created Aug 11, 2014
Rubyconf T-shirt code
View developers.rb
class Rubyconf
event year: 2014, role: :rubyist
end