# crystal build foo.cr --release | |
# ./foo 37.7749 -122.4194 34.0522 -118.2437 | |
# | |
# Around 0.08s. | |
module GeoCalculator | |
EARTH_RADIUS_IN_KM = 6371.0 | |
def self.distance(lat1, lon1, lat2, lon2) | |
dlat = lat2 - lat1 |
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
" IdeaVim Wiki https://github.com/JetBrains/ideavim/wiki | |
" Find more examples here: https://jb.gg/share-ideavimrc | |
" The Essential IdeaVim Remaps https://towardsdatascience.com/the-essential-ideavim-remaps-291d4cd3971b | |
let mapleader=" " | |
""" Common settings | |
set showmode | |
set scrolloff=5 | |
" Do incremental searching. |
#!/bin/bash | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
Our app was already deployed and working on Heroku with MiniMagick. There were a few features of Image Processing that were appealing, performance and autorotation, and it appeared to be a straightforward swap.
Locally, we had run brew install vips
on our MacBooks to get it running. That was early in the process and a detail long forgotten. When I deployed to Heroku @juliancheal pointed out that the staging environment was failing with an ActiveSupport::MessageVerifier::InvalidSignature
error.
We were able to quickly identify the missing libvips
dependency.
Figuring out how to install libvips
to support rubyvips
to support Image Processing was not trivial and therefore this guidepost exists.
発表資料はこちら https://www.slideshare.net/tomoyaishida1238/ruby-227588719
!eval s="$><< '!%sl s=%%p'% :eva%s"
https://gist.github.com/tompng/d79e12f3d056cf12c1448a097035bdf3
If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
Performance mode changes the system parameters of your Mac. These changes take better advantage of your hardware for demanding server applications.
A Mac with macOS Server that needs to run high-performance services can turn on performance mode to dedicate additional system resources for server applications. Note, however, that performance mode can be enabled even without macOS Server being installed to achieve similar benifits for other high-performance services.
sudo nvram boot-args="serverperfmode=1 $(nvram boot-args 2>/dev/null | cut -f 2-)"
sudo reboot
Reference: https://support.apple.com/en-us/HT202528.