All Stories

GraphQL Invalid IAP credentials: empty token

Google App engine + Apollo GraphQL Invalid IAP credentials: empty token

Một vài Atom package hữu ích với web developer

Hôm nay mình xin phép được giới thiệu 1 số package mà mình thường sử dụng

You dont need Momentjs

Moment.js is a fantastic time & date library with lots of great features and utilities. However, if you are working on a performance sensitive web application, it might cause a...

Using Puppeteer in Google Cloud Functions

Setup package.js { "name": "sample-http", "version": "0.0.1", "dependencies": { "puppeteer": "^1.9.0" } }

Better Rails where like query

Problem user_name = "I'm Tony" User.where("name like '%#{user_name}%'") # => SELECT `users`.* FROM `users` WHERE (name like '%I'm Tony%') => ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax;...

Set basic auth for specific environment

For all environment Set authentication in ApplicationController # app/controllers/application_controller.rb class ApplicationController < ActionController::Base http_basic_authenticate_with name: 'username', password: 'password' end

Rails cache fetch

Problem ```ruby def generate_job_id cached_value = Rails.cache.fetch(“cache_key”, expires_in: 24.hours) do