Skip to content

Instantly share code, notes, and snippets.

$ DATABASE_URL=postgres://postgres:password@postgres/postgres?sslmode=disable go run utils/foo.go
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x68e9dc]
goroutine 1 [running]:
github.com/ericlagergren/decimal.(*Big).IsNaN(...)
/home/app/go/pkg/mod/github.com/ericlagergren/[email protected]/big.go:853
github.com/volatiletech/sqlboiler/v4/types.decimalValue(0x0, 0x8fe300, 0x0, 0x0, 0x7fa1a03ebca0, 0x8a9601)
/home/app/go/pkg/mod/github.com/volatiletech/sqlboiler/[email protected]/types/decimal.go:140 +0x3c
github.com/volatiletech/sqlboiler/v4/types.Decimal.Value(0x0, 0xc0001a15f0, 0x40d1e5, 0x6c4760, 0x7007c0)
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'mongoid'
end
require 'yaml'
require 'tempfile'
class ArticleEntity < ArticleCommonEntity; end
def as_json
{id: @article.id, thumbnail_url: @article.thumbnail_url}
end
end
get "/articles" do
Article.all.map {|a| ArticleEntity.new(a) }.to_json
end
const postQuery = async <TData, TVariables>(query: string, variables: TVariables) => {
const token = await firebase.auth().currentUser!.getIdToken();
const resonse = await fetch('/graphql', {
method: 'POST',
body: JSON.stringify({ query, variables })
});
const json: { data: TData, errors: Array<any> | undefined } = await resonse.json();
const postQuery = async <TData, TVariables>(query: string, variables: TVariables) => {
const token = await firebase.auth().currentUser!.getIdToken();
const resonse = await fetch('/graphql', {
method: 'POST',
credentials: 'include',
headers: {
'content-type': 'application/json',
'authorization': `Bearer ${token}`,
'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]')!.getAttribute('content')!
2020/05/24 10:12:22 Doing playback at 10.00x speed
2020/05/24 10:12:22 Preprocessing file
2020/05/24 10:13:22 Preprocess complete
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
2020/05/24 10:14:10 context.Execute error: error executing op: Closed explicitly
set -eux
wget "https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip"
unzip BrowserStackLocal-linux-x64.zip
./BrowserStackLocal $ACCESS_KEY &
bundle exec cucumber
app@e0d06d8801e4:/app/actionpack$ ruby -e "puts 100.times.select { system('bin/test test/controller/render_test.rb') }.count"
Run options: --seed 10537
# Running:
.................................................................
Finished in 1.416651s, 45.8829 runs/s, 222.3554 assertions/s.
65 runs, 315 assertions, 0 failures, 0 errors, 0 skips
Run options: --seed 27092
@mtsmfm
mtsmfm / test.yml
Last active May 17, 2019 11:15
CircleCI hangs
version: 2.1
workflows:
version: 2
test:
jobs:
- test
jobs:
test:
docker:
@mtsmfm
mtsmfm / test.html
Last active January 30, 2019 12:19
iOS title bug
<html>
<head>
<script>
document.title = 'aaaaa';
setTimeout(() => {
history.pushState({}, "", "/xxxxxxxxxx");
}, 3000);
</script>
</body>
Test