Skip to content

Instantly share code, notes, and snippets.

View smcabrera's full-sized avatar
🐶

Stephen Mariano Cabrera smcabrera

🐶
View GitHub Profile
We couldn’t find that file to show.
# How and why to move from rails to phoenix
[This talk from rails conf 2016](https://youtu.be/OxhTQdcieQE?list=PLE7tQUdRKcyZGYLfj6oRQWPxB6ijg1YsC
)
Takeaways:
- Performance is better
- Less _work_ to achieve reasonable performance
- _Long term_ developer happiness
- Retraining Rails developers quickly
Costs are the cost per item times the number of item
plus_account_purchase_cost
org_account_purchase_cost
international_mail_cost
domestic_mail_cost
online_app_cost
plus_account_purchase_count
@smcabrera
smcabrera / .vimrc
Last active November 15, 2016 17:21
Some sensible defaults for a .vimrc
"============================================================
"== Vundle Plugin Manager
"============================================================
"found here: https://github.com/VundleVim/Vundle.vim
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
"============================================================
"== Plugins: Sensible Defaults
#!/bin/sh
# Assumes tmux sessions will have the same name as their projects
# and that those projects are all housed in a "projects" folder in the user's home folder
# change "project_dir" to the path to your projects folder (e.g. "$HOME/code", "$HOME/projects" etc.)
project_dir=$HOME/workspace # path/to/projects/dir/here
if [ $1 ]
then
if ! cd $project_dir/$1
desc "task for retroactively assign strikes if student doesn't have interactions in the last 6 months"
task :retroactively_create_interactions_for_logs => :environment do |t, args|
ActiveRecord::Base.transaction do
puts "processing #{CallLog.count} call records..."
index = 0
CallLog
.find_each(:batch_size => 10000) do |log|
adoption = Adoption.find_by(student_id: log.student_id, mentor_id: log.mentor_id)
# Using absurd timestamps as a flag for the future to identify these logs which myseriously have no created_at date
require 'rspec'
class KataBankParser
def ascii_number_to_integer(ascii)
one = " " + "\n" +
" |" + "\n" +
" |" + "\n" +
" "
two = " _ \n" +
GIT
remote: git://github.com/afcapel/rack-pjax.git
revision: c776a9a9eaa0641636e9ece5cfe88fc739339072
branch: master
specs:
rack-pjax (0.8.0)
nokogiri (>= 1.5)
rack (>= 1.1)
GIT
# rvm install 2.3.1
# gem install bundle
# gem update --system
# bundle install
# rails app:update:bin
# ^^ hit "a" to overwrite all