Skip to content

Instantly share code, notes, and snippets.

View nipe0324's full-sized avatar

nipe0324 nipe0324

  • Japan
View GitHub Profile
@nipe0324
nipe0324 / tuning.md
Created May 28, 2023 01:33
ISUCON12のチューニングメモ(初期 1345 -> 最終スコア 86910)

ISUCON12のチューニングメモ

初期スコア

04:15:02.788004 Error 3 (Critical:3)
04:15:02.788010 PASSED: true
04:15:02.788013 SCORE: 1345 (+1921 -576(30%))
```rb
# table
# - users
# - users_profiles
# app/models/user.rb
class User < ApplicationRecord
end
# app/models/users.rb
@nipe0324
nipe0324 / http-request-net-https-bugnsag.rb
Last active October 31, 2018 13:20
bugsnag http request by net/https
# https://github.com/bugsnag/bugsnag-ruby/blob/master/lib/bugsnag/delivery/synchronous.rb
require "net/https"
require "uri"
module Bugsnag
module Delivery
class Synchronous
class << self
##
# Attempts to deliver a payload to the given endpoint synchronously.
@nipe0324
nipe0324 / ImageMagick 6.9.9-10 Homebrew Formula.md
Last active June 21, 2018 05:02 — forked from afaur/ImageMagick 6.9.7-3 Homebrew Formula.md
Homebrew Formula for ImageMagick 6.9.10-2

Homebrew Formula patching old ImageMagick release 6.9.9-10

Install

$ brew install  https://gist.githubusercontent.com/nipe0324/676047ff7cfd57cb41816dc7b9860e46/raw/87b0f14890248b24944f4f49150942f6ab250981/imagemagick.rb

Tested

@nipe0324
nipe0324 / db.rake
Created July 30, 2016 05:36 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@nipe0324
nipe0324 / devise.ja.yml
Created August 2, 2014 13:30
devise.ja.yml (devise 3.2.2 & rails 4.0.1) Please copy to "config/locales/devise.ja.yml" on your Rails app.
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
ja:
devise:
confirmations:
confirmed: "アカウントの確認が成功しました。"
send_instructions: "アカウントの確認方法をメールでご連絡します。"
send_paranoid_instructions: "あなたのメールアドレスが登録済みの場合、アカウントの確認方法をメールでご連絡します。"
failure:
already_authenticated: "既にログイン済みです。"