Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
/** | |
* Simply compares two string version values. | |
* | |
* Example: | |
* versionCompare('1.1', '1.2') => -1 | |
* versionCompare('1.1', '1.1') => 0 | |
* versionCompare('1.2', '1.1') => 1 | |
* versionCompare('2.23.3', '2.22.3') => 1 | |
* | |
* Returns: |
** Find commmonly accessed tables and their use of indexes: | |
SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
Returns output like: | |
relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
----------------------+--------------+---------------+------------------------ | |
schema_migrations | 817 | 0 | 0.00000000000000000000 | |
user_device_photos | 349 | 0 | 0.00000000000000000000 |
# Encoding: utf-8 | |
# | |
# idle.rb | |
# | |
# goal: | |
# Ruby script to test how to fetch IMAP mails with IDLE mode. | |
# IMAP IDLE allow a sort of "push" / "real-time" delivery. | |
# | |
# I used the script to test LATENCY (end-to-end delivery times) |
module MyApp | |
class Application < Rails::Application | |
if Rails.env == 'test' | |
require 'diagnostic' | |
config.middleware.use(MyApp::DiagnosticMiddleware) | |
end | |
end | |
end |
import lombok.AccessLevel; | |
import lombok.NoArgsConstructor; | |
import lombok.extern.slf4j.Slf4j; | |
import org.hibernate.Criteria; | |
import org.hibernate.engine.spi.SessionFactoryImplementor; | |
import org.hibernate.internal.CriteriaImpl; | |
import org.hibernate.internal.SessionImpl; | |
import org.hibernate.loader.OuterJoinLoader; | |
import org.hibernate.loader.criteria.CriteriaLoader; | |
import org.hibernate.persister.entity.OuterJoinLoadable; |