Skip to content

Instantly share code, notes, and snippets.

View olgeni's full-sized avatar

Giacomo Olgeni olgeni

View GitHub Profile
@olgeni
olgeni / rc_lib.sh
Last active January 14, 2016 23:13
Functions to access rc.conf and loader.conf
rc_set()
{
local _file="$1"
local _key="$2"
local _value="$3"
if grep -E "^[[:space:]]*${_key}|#[[:space:]]*${_key}" ${_file} > /dev/null 2>&1; then
sed -E -i '' -e "/^[[:space:]]*${_key}[[:space:]]*=[[:space:]]*/ c\\
${_key}=\"${_value}\"
/^[[:space:]]*#[[:space:]]*${_key}/ c\\

Keybase proof

I hereby claim:

  • I am olgeni on github.
  • I am olgeni (https://keybase.io/olgeni) on keybase.
  • I have a public key whose fingerprint is 7133 AB4D DFC8 0A0D F891 B0D2 90B7 A98E 6450 AE47

To claim this, I am signing this object:

@olgeni
olgeni / disk-list-1.txt
Created May 28, 2016 18:23
geom disk list output #1
Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 1000204886016 (932G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r2w2e5
descr: WDC WD1000DHTZ-04N21V1
lunid: 50014ee6af39b278
@olgeni
olgeni / disk-list-2.txt
Last active May 28, 2016 18:24
geom disk list output #2
Geom name: da0
Providers:
1. Name: da0
Mediasize: 1200243695616 (1.1T)
Sectorsize: 512
Mode: r2w2e5
descr: SEAGATE ST1200MM0088
lunid: 5000c5008880a597
ident: S400598W
rotationrate: 10000
@olgeni
olgeni / gist:6fab34755f456118e07d94865ab91e20
Created June 27, 2016 12:46
Racket 6.5 exception when typing into drracket (FreeBSD amd64)
make-fsemaphore: contract violation
expected: exact-nonnegative-integer?
given: '(def ('#%kernel print))
context...:
/usr/local/share/racket/pkgs/typed-racket-lib/typed-racket/utils/any-wrap.rkt:16:0: base-val?
/usr/local/share/racket/pkgs/typed-racket-lib/typed-racket/utils/any-wrap.rkt:106:2: any-wrap/traverse
/usr/local/share/racket/collects/racket/contract/combinator.rkt:178:4
/usr/local/share/racket/collects/racket/contract/private/arrow-higher-order.rkt:373:33
/usr/local/share/racket/collects/racket/contract/private/guts.rkt:638:8
/usr/local/share/racket/collects/racket/contract/private/arrow-val-first.rkt:400:5: mk-call
@olgeni
olgeni / gist:ef3d068680cb8d077f9cfbc1f8e82f2e
Created June 27, 2016 19:22
Racket test program, decompiled
(begin
(quote inspector insp0)
(module file ....
(quote self {#%modidx #f #f})
(quote internal-context #t)
(quote bindings #0=#hasheq())
(quote language-info #f)
(require (lib "racket/main.rkt"))
(provide)
(quote inspector insp0)
(begin
(quote inspector insp0)
(module file ....
(quote self #0={#%modidx #f #f})
(quote
internal-context
(#%decode-syntax
{wrap
#({wrap
#t
Fatal trap 9: general protection fault while in kernel mode
cpuid = 3; apic id = 03
instruction pointer = 0x20:0xffffffff80cff6e4
stack pointer = 0x28:0xfffffe011ab2e8b0
frame pointer = 0x28:0xfffffe011ab2e900
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 12 (swi4: clock (0))
[ thread pid 12 tid 100008 ]
FreeBSD/amd64 (...) (ttyu0)
login: root
Password:
----------------------------------------------
| Hello, this is OPNsense 18.7 | @@@@@@@@@@@@@@@
| | @@@@ @@@@
| Website: https://opnsense.org/ | @@@\\\ ///@@@
| Handbook: https://docs.opnsense.org/ | )))))))) ((((((((
| Forums: https://forum.opnsense.org/ | @@@/// \\\@@@
03:11:06.546817 IP 10.64.23.34.35232 > 10.101.214.155.http: Flags [S], seq 401861570, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 1195754928 ecr 0], length 0
03:11:06.561751 IP 10.101.214.155.http > 10.64.23.34.35232: Flags [S.], seq 2391121544, ack 401861571, win 4344, options [mss 1360,sackOK,TS val 84715020 ecr 1195754928], length 0
03:11:06.561761 IP 10.64.23.34.46146 > 10.101.214.155.http: Flags [R], seq 401861571, win 0, length 0