Skip to content

Instantly share code, notes, and snippets.

View benoitongit's full-sized avatar

Benoit Zeler benoitongit

View GitHub Profile
@benoitongit
benoitongit / my_vue_component.coffee
Last active May 8, 2021 10:24
Make Vue.js works with Ruby on Rails and Turbolinks 5. Gem is available here: https://github.com/benoitongit/vue-on-rails
@MyComponent =
props: ['myProp']
template: '<div>A custom component with {{myProp}}</div>'
@benoitongit
benoitongit / twilio.rb
Created April 22, 2017 18:21
Generate Twilio access token for video usage in ruby
module App
class Twilio
ACCOUNT_SID = 'XXXXXXXXXXXXXXXXX'.freeze
API_KEY_SID = 'XXXXXXXXXXXXXXXXX'.freeze
API_SECRET = 'XXXXXXXXXXXXXXXXX'.freeze
VIDEO_SID = 'XXXXXXXXXXXXXXXXX'.freeze
def generate_token(user_id)
# Create an Access Token for Video usage
token = ::Twilio::Util::AccessToken.new ACCOUNT_SID, API_KEY_SID, API_SECRET, 3600, user_id
new Vue({
el: '#my-vue-app',
components: { 'vue-slider': VueSlider }
});