.env
KAMAL_REGISTRY_PASSWORD=dckr_pat_*******************o
POSTGRES_PASSWORD=blog_*******************_password.kamal/secrets
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
POSTGRES_PASSWORD=$POSTGRES_PASSWORD.env
KAMAL_REGISTRY_PASSWORD=dckr_pat_*******************o
POSTGRES_PASSWORD=blog_*******************_password.kamal/secrets
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
POSTGRES_PASSWORD=$POSTGRES_PASSWORD.env
KAMAL_REGISTRY_PASSWORD=dckr_pat_*******************o
MYSQL_ROOT_PASSWORD=blog_*******************_password.kamal/secrets
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD
MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD| #!/bin/bash | |
| osascript <<EOD | |
| tell application "System Preferences" | |
| (run) | |
| set current pane to pane "com.apple.preference.trackpad" | |
| end tell | |
| tell application "System Events" | |
| tell process "System Preferences" | |
| delay 0.6 | |
| click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad" |
New images for site / blog
| # m h dom mon dow command | |
| * * * * * /home/deepak/workspace/status_check.sh >> /home/deepak/workspace/logs/status.log 2>&1 |
| /** | |
| * Hindi Voice Bot | |
| * | |
| * This function lets you ask questions in Hindi and get a proper response | |
| */ | |
| exports.handler = function(context, event, callback) { | |
| let twiml = new Twilio.twiml.VoiceResponse() | |
| if(event.SpeechResult) { | |
| var got = require('got'); | |
| var requestPayload = { |
| # app/models/user.rb | |
| class User < ActiveRecord::Base | |
| has_many :posts, dependent: :destroy | |
| has_many :published_posts, -> { published }, class_name: 'Post' | |
| end | |
| # app/models/post.rb | |
| class Post < ActiveRecord::Base | |
| belongs_to :user | |
| scope :published, -> { where(published: true) } |
| User.includes(:published_posts).map do |user| | |
| [user.name, user.published_posts.map(&:title).join(', ')] | |
| end | |
| User Load (0.3ms) SELECT "users".* FROM "users" | |
| Post Load (0.3ms) SELECT "posts".* FROM "posts" WHERE (published = 't') AND "posts"."user_id" IN (1, 2, 3) | |
| #=> [["Jack", "post-1, post-2"], ["Adam", "post-3, post-3"], ["John", "post-5, post-6"]] |