Persyaratan perpanjangan SIM C, tes psikotes jalan gunung Sanghyang seberang pohon besar 90, surat keterangan sehat cari di Gunung Guntur 25.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const webpack = require('webpack') | |
| const { environment } = require('@rails/webpacker') | |
| // Don't use commons chunk for server_side_render chunk | |
| const entries = environment.toWebpackConfig().entry | |
| const commonsChunkEligible = Object.keys(entries).filter(name => name !== 'server_side_render') | |
| environment.plugins.set('CommonsChunkVendor', new webpack.optimize.CommonsChunkPlugin({ | |
| name: 'vendor', | |
| minChunks: (module, count) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module PingPong # App Engine health check without a trip to DB | |
| class Middleware | |
| def initialize app, ping_path = '/status' | |
| @app = app | |
| @ping_path = ping_path | |
| Rails.backtrace_cleaner.add_silencer { |line| line =~ /#{File.basename(__FILE__)}/ } | |
| end | |
| def pong_code | |
| 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM bitnami/ruby:2.6.3 | |
| ARG DEBIAN_VERSION="stretch" | |
| RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ | |
| curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
| echo "deb https://dl.yarnpkg.com/debian/ stable main" | \ | |
| tee /etc/apt/sources.list.d/yarn.list && \ | |
| echo "deb http://packages.cloud.google.com/apt cloud-sdk-$DEBIAN_VERSION main" | \ | |
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Exponential backoff in Ruby | |
| begin | |
| make_request | |
| rescue RequestError => e | |
| if retries <= max_retries | |
| retries += 1 | |
| sleep 2 ** retries | |
| retry | |
| else | |
| raise "Timeout: #{e.message}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Array | |
| def my_map | |
| self.reduce([]) do |new_array, element| | |
| new_array.push(yield(element)) | |
| end | |
| end | |
| end | |
| [1, 2, 3].my_map { |x| x * 2 } | |
| #=> [2, 4, 6] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Put this script in ~/.password-store alongside import.csv | |
| # This script requires the CSV to have these columns: | |
| # `title`, `username`, `password`, `additional_secret` | |
| require "csv" | |
| require "fileutils" | |
| require "gpgme" # gem install gpgme | |
| gpg_recipients = "hello@ukazap.space" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This Dockerfile for a Ruby application was generated by gcloud. | |
| # The base Dockerfile installs: | |
| # * A number of packages needed by the Ruby runtime and by gems | |
| # commonly used in Ruby web apps (such as libsqlite3) | |
| # * A recent version of NodeJS | |
| # * A recent version of the standard Ruby runtime to use by default | |
| # * The bundler gem | |
| FROM gcr.io/google-appengine/ruby:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # We have to remove validations on email, as it's no longer needed. | |
| # Based on a solution found at http://stackoverflow.com/questions/7545938/how-to-remove-validation-using-instance-eval-clause-in-rails | |
| Model.class_eval do | |
| _validators.reject!{ |key, _| key == :field } | |
| _validate_callbacks.each do |callback| | |
| callback.raw_filter.attributes.delete :field | |
| end |