Chrome ExtensionのLive HTTP Headersを調査した。Firefox用のものではない。Firefox用のものではない。
11/7追記
- 類似 or 同様の方法で難読化scriptを埋め込んでいる拡張機能が大量にあったため、Googleに報告済み。
- https://twitter.com/bulkneets/status/795260268221636608
Summary in english.
Chrome ExtensionのLive HTTP Headersを調査した。Firefox用のものではない。Firefox用のものではない。
11/7追記
Summary in english.
# | |
# includesでentriesとそれに紐づくcommentsをロードしておく。 | |
# そうすることで以後の処理でentriesとそれに紐づくcommentsを取得するさいに | |
# 毎回SQLを発行することを防ぐ。 | |
# | |
# includesのかわりにjoinsを使うと事前ロードはされないため、 | |
# 以後の処理でSQLが吐かれてしまうので注意する。 | |
# | |
blog = Blog.includes(:entries => :comments).find_by_id(1) |
MLflow has an internally pluggable architecture to enable using different backends for both the tracking store and the artifact store. This makes it easy to add new backends in the mlflow package, but does not allow for other packages to provide new handlers for new backends.
This would be useful for several reasons:
We have Rails application which is running tests on circleCI 2.0, we have simplecov configured to track the coverage of our test suite. Now the problem is with parallelism enabled, we have partial coverage reports in all different containers according to the tests those containers ran.
We obviously want to have consolidated simplecov coverage report which actually shows us overall coverage report.
$ npm install -g http-server
$ http-server -p 8000 -a foo.bar.com
Would serve PWD at http://foo.bar.com/
# | |
# Sample nginx.conf optimized for EC2 c1.medium to xlarge instances. | |
# Also look at the haproxy.conf file for how the backend is balanced. | |
# | |
user "nginx" "nginx"; | |
worker_processes 10; | |
error_log /var/log/nginx_error.log info; |
/* this code is from http://c-faq.com/lib/calendar.br.html */ | |
#define DayOfWeek(d,m,y) (int)(DaysElapsed(d,m,y) % 7) | |
long DaysElapsed(int d,int m,int y) { | |
static int cd[]={0,31,59,90,120,151,181,212,243,273,304,334}; | |
long n=365L*(y-1); | |
if (m<3) y--; | |
return n+y/4-y/100+y/400+cd[m-1]+d; |
require 'ripper' | |
require 'pp' | |
exp = ARGV.join(" ") | |
p Ripper.sexp(exp) |
require 'facets/hash/recurse' | |
# Usage: | |
# expect(actual).to match_hash(expected) | |
# | |
RSpec::Matchers.define :match_hash do |expected| | |
match do |actual| | |
# Sort hashes before comparing so that the diff only shows actual changes between keys and | |
# values. | |
actual = actual.recurse {|h| h.sort_by {|k,v| k.to_s }.to_h } |
import { Client } from '../../../src/middleware/client' | |
import type { AppType } from './server' | |
const client = new Client<AppType>('http://127.0.0.1:8787/api') | |
const res = await client.json('/posts', { | |
id: 123, | |
title: 'hello', | |
}) |