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 / 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:
<html>
<head>
<title>Error communicating with origin</title>
<link rel="stylesheet" id="cf_styles-css" href="https://cloudflareworkers.com/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<style type="text/css">body{margin:0;padding:0}</style>
</head>
<body>
<div id="cf-wrapper">
<div id="cf-error-details" class="cf-error-details-wrapper">
<div class="cf-wrapper cf-header cf-error-overview">
@dentarg
dentarg / patrik.photos.txt
Created April 25, 2019 21:32
https://exposure.co getting SSL certificate from Let's Encrypt on-the-fly
$ curl -s -v https://patrik.photos
* Rebuilt URL to: https://patrik.photos/
* Trying 100.25.9.126...
* TCP_NODELAY set
* Connected to patrik.photos (100.25.9.126) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem