Skip to content

Instantly share code, notes, and snippets.

View dentarg's full-sized avatar
🌦️
=:D><!

Patrik Ragnarsson dentarg

🌦️
=:D><!
View GitHub Profile
@dentarg
dentarg / heroku-ci-sample-timings-and-cost.md
Created December 11, 2021 12:43 — forked from jasonrudolph/heroku-ci-sample-timings-and-cost.md
Sample timings and costs using various Heroku CI dyno types

Sample timings (in seconds)

Sample timings using Heroku CI for a small-ish Rails 6 app on various Heroku dyno types:

Dyno Type Run 1 Duration Run 2 Duration Run 3 Duration Average Duration
standard-1x 312 213 303 276
standard-2x 227 121 222 190
performance-m 162 164 175 167
performance-l 100 104 107 104
@dentarg
dentarg / puma-ci-macos.md
Last active November 4, 2021 08:14
Puma CI issues (macOS)

2021-11-04 07:29

macos-10.15 2.2 success https://github.com/puma/puma/runs/4102248480?check_suite_focus=true, from raw logs

2021-11-04T07:29:54.9140459Z Found online and idle hosted runner in the current repository's organization account that matches the required labels: 'macos-10.15'
2021-11-04T07:29:54.9587024Z Waiting for a Hosted runner in the 'organization' to pick this job...
2021-11-04T07:29:57.7460261Z Job is waiting for a hosted runner to come online.
2021-11-04T07:30:03.7698722Z Job is about to start running on the hosted runner: GitHub Actions 10 (hosted)
2021-11-04T07:30:08.9028460Z Current runner version: '2.284.0'
@dentarg
dentarg / instance variable not initialized.rb
Last active April 13, 2021 14:02
Ruby and "instance variable not initialized"
irb(main):001:0> baz
Traceback (most recent call last):
4: from /Users/dentarg/.rubies/ruby-2.7.1/bin/irb:23:in `<main>'
3: from /Users/dentarg/.rubies/ruby-2.7.1/bin/irb:23:in `load'
2: from /Users/dentarg/.rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/irb-1.2.3/exe/irb:11:in `<top (required)>'
1: from (irb):1
NameError (undefined local variable or method `baz' for main:Object)
irb(main):002:0> baz = "baz" if false
=> nil
irb(main):003:0> baz
@dentarg
dentarg / dot.env
Last active November 4, 2020 10:13
foreman vs dotenv - foreman does not handle inline comments
$ cat .env
TEST1=foo # comment
TEST2='foo' # comment
TEST3="foo" # comment
$ cat env.rb
$stdout.sync = true
puts ENV['TEST1']
puts ENV['TEST1'].inspect
puts

algo setup

På servern (VM)

git clone https://github.com/trailofbits/algo.git
cd algo
sudo apt install -y python3-virtualenv
python3 -m virtualenv --python="$(command -v python3)" .env &&   source .env/bin/activate &&   python3 -m pip install -U pip virtualenv &&   python3 -m pip install -r requirements.txt
@dentarg
dentarg / online-expand.txt
Last active February 20, 2020 14:59
ZFS mirror pool expand
vagrant-mysql% grep ada /var/run/dmesg.boot
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <VBOX HARDDISK 1.0> ATA-6 device
ada0: Serial Number VB95af0d4a-496c8996
ada0: 33.300MB/s transfers (UDMA2, PIO 65536bytes)
ada0: 65536MB (134217728 512 byte sectors)
ada1 at ahcich0 bus 0 scbus2 target 0 lun 0
ada1: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada1: Serial Number VB31616783-08bbc3fa
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
@dentarg
dentarg / update-gems.yml
Created February 8, 2020 17:07 — forked from filipkis/update-gems.yml
GitHub Action Workflow for updating gems after dependabot push
name: Update Gems After Dependabot
on:
push:
branches:
- 'dependabot/bundler/**'
paths:
- 'Gemfile.lock'
jobs: