Skip to content

Instantly share code, notes, and snippets.

View pauldruziak's full-sized avatar

Paul pauldruziak

View GitHub Profile
@dhnaranjo
dhnaranjo / 01_robo_junior.rb
Last active August 3, 2023 20:15
A cute AI-powered junior engineer to maybe do something useful.
# Required gems:
# - asimov
# - fast_ignore
class RoboJunior
def get_to_work
puts(changes)
Changer.new.change_stuff(changes)
end
@searls
searls / .solargraph.yml
Last active August 2, 2023 09:14 — forked from DRBragg/.solargraph.yml
My config with steps to use solargraph for Rails projects in VS Code (WIP)
---
include:
- ".solargraph_definitions.rb"
- "app/**/*.rb"
- "config/**/*.rb"
- "lib/**/*.rb"
exclude:
- test/**/*
- vendor/**/*
- ".bundle/**/*"
# Cleans up branches like:
# if Shopify.rails_next?
# # Rails 5 login
# else
# # Rails 4 login
# end
module RuboCop
module Cop
module ShopifyRails
class RailsNextUnless < Cop
class WizardsController < ApplicationController
before_action :load_user_wizard, except: %i(validate_step)
def validate_step
current_step = params[:current_step]
@user_wizard = wizard_user_for_step(current_step)
@user_wizard.user.attributes = user_wizard_params
session[:user_attributes] = @user_wizard.user.attributes
@pauldruziak
pauldruziak / README.md
Last active March 27, 2016 18:43
Helper for navigation link

Put in your Gemfile:

gem 'nav_link', 'git@gist.github.com:034011db54668d4966ca.git'

Include NavLink in ApplicationHelper:

module ApplicationHelper
  include NavLink
end
@iamatypeofwalrus
iamatypeofwalrus / generate_ctags.md
Last active February 11, 2019 10:17
Generate ctags for Atom (or for any other reason) on Mac os X

Why?

Atom can automagically picks up any tags file in your current directory which enables you to:

  • shift+cmd+r search for any function in your project
  • alt+cmd+down GoTo a function declaration

How

Get brew if you don't already have it. Then:

brew install ctags

@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@kavu
kavu / swift.sh
Last active June 20, 2017 02:58
Minimal Swift command line Hello World
#!/bin/sh
# So you've installed XCode 6 Beta
# Now we could use Swift toolchain to build a minimal
# command line Hellow World
# let's set new Developer Toolchain bundled with Xcode6-Beta.app
# as default toolchain
# sudo xcode-select -s /Applications/Xcode6-Beta.app/Contents/Developer
# alias for Swift binary
@ianchesal
ianchesal / breathalyzer
Last active August 29, 2015 14:01
breathalyzer -- Run Rubocop on Changed Files in a Git-Managed Directory
#!/usr/bin/env ruby
##
# Runs rubocop on just the modified and new files in a repoistory. Handy for
# checking your compliance before you commit. It only runs against files that
# end in .rb. Maybe it should do more than that?
#
# Easy to run. In a dirty working directory:
#
# breathalyzer