Skip to content

Instantly share code, notes, and snippets.

View tomas-stefano's full-sized avatar

Tomas D'Stefano tomas-stefano

  • Ministry of Justice
  • London
View GitHub Profile
@tomas-stefano
tomas-stefano / Gemfile
Last active June 4, 2020 13:40
DEFRA to MoJ metadata (a simple version)
gem 'rspec'
@tomas-stefano
tomas-stefano / read_session.rb
Last active July 21, 2017 13:07
Read yaml/erb files
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 July 17, 2017 10:25
Notes. It is about karma
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
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 13:20
PRs list from mas
gem 'octokit'
@tomas-stefano
tomas-stefano / install_deis.sh
Last active October 28, 2016 02:41
Simple script to install Deis locally with vagrant
# 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

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 August 29, 2015 14:16
Codebar student Capybara selenium browser starts
source 'http://rubygems.org'
gem 'rspec'
gem 'capybara'
gem 'selenium-webdriver'
gem 'site_prism'
@tomas-stefano
tomas-stefano / Readme.md
Last active January 18, 2023 13:56
Pre commit ruby script

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 August 11, 2014 14:24
Rubyconf T-shirt code
class Rubyconf
event year: 2014, role: :rubyist
end