$ rails new my-i8n --webpack
Gemfile
gem 'i18n-js'
# FOR BUSY JOBS | |
# take the process_id from the /busy page in sidekiq and kill the longest running one. | |
workers = Sidekiq::Workers.new | |
long_process_id = 'integration.3:4:71111aaa111' # Eg: 'integration.3:4:71d1d7f4ef5a' | |
workers.each do |process_id, thread_id, work| | |
process = Sidekiq::Process.new('identity' => process_id) | |
process.stop! if process_id == long_process_id | |
end | |
# FOR SCHEDULED JOBS |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(f,t){function e(t,e){return e.toUpperCase()}var i=[],c=i.slice,g=i.concat,a=i.push,n=i.indexOf,s={},o=s.toString,m=s.hasOwnProperty,v={},_=f.document,r="2.1.4",C=function(t,e){return new C.fn.init(t,e)},l=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,h=/^-ms-/,u=/-([\da-z])/gi;function d(t){var e="length"in t&&t.length,i=C.type(t);return"function"!==i&&!C.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&0<e&&e-1 in t))}C.fn=C.prototype={jquery:r,constructor:C,selector:"",length:0,toArray:function(){return c.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:c.call(this)},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return C.each( |
$ rails new my-i8n --webpack
Gemfile
gem 'i18n-js'
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
brew tap homebrew/versions | |
brew install v8-315 | |
gem install libv8 -v '3.16.14.13' -- --with-system-v8 | |
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8@3.15 | |
bundle install |
dic = { | |
'áàảãạăắặằẳẵâấầẩẫậ': 'a', | |
'ÁÀẢÃẠĂẮẶẰẲẴÂẤẦẨẪẬ': 'A', | |
'đ': 'd', | |
'Đ': 'D', | |
'éèẻẽẹêếềểễệ': 'e', | |
'ÉÈẺẼẸÊẾỀỂỄỆ': 'E', | |
'íìỉĩị': 'i', | |
'ÍÌỈĨỊ': 'I', | |
'óòỏõọôốồổỗộơớờởỡợ': 'o', |
I hereby claim:
To claim this, I am signing this object:
- # app/views/comments/_comment.html.slim | |
li data-controller="comment" data-action="click->comment#hello" | |
= "#{comment.message} by #{comment.user.email}" |
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.