Skip to content

Instantly share code, notes, and snippets.

View thadeu's full-sized avatar
🏠
Working from home

thadeu thadeu

🏠
Working from home
View GitHub Profile
@thadeu
thadeu / clear-sidekiq-jobs.sh
Created July 26, 2021 20:54 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@thadeu
thadeu / rspec_model_testing_template.rb
Created April 3, 2020 13:33 — forked from SabretWoW/rspec_model_testing_template.rb
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:
@thadeu
thadeu / config.rb
Created October 26, 2018 17:22 — forked from javierarques/config.rb
Middleman 4 and Webpack 3 integration. Use Middleman with External Pipeline.
# ...
activate :external_pipeline,
name: :webpack,
command: build? ? "npm run build:assets" : "npm run start:assets",
source: ".tmp/webpack_output",
latency: 1
# ...
@thadeu
thadeu / MainApp.js
Created February 17, 2017 13:57 — forked from aphillipo/MainApp.js
Wrapping React Native Navigator
class MainApp extends Component {
constructor(props) {
super(props);
}
renderScene(route, navigator) {
var Component = route.component;
return (
<Component route={route} navigator={navigator} />
);