Skip to content

Instantly share code, notes, and snippets.

Avatar

Oliver Smith kfsone

View GitHub Profile
@kfsone
kfsone / packet.dat
Last active Aug 12, 2021
THE packet from THE router
View packet.dat
# I was able to capture a cctv packet at the router when mike lindell was attacked,
# providing proof that he was attacked and trump won the election.
# Here is proof of legitimacy: https://www.youtube.com/watch?v=JgtgX26ANcU
# And below is the actual packet in its raw form.
00000000 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 60 |......JFIF.....`|
00000010 00 60 00 00 ff e1 00 68 45 78 69 66 00 00 4d 4d |.`.....hExif..MM|
00000020 00 2a 00 00 00 08 00 04 01 1a 00 05 00 00 00 01 |.*..............|
00000030 00 00 00 3e 01 1b 00 05 00 00 00 01 00 00 00 46 |...>...........F|
00000040 01 28 00 03 00 00 00 01 00 03 00 00 01 31 00 02 |.(...........1..|
00000050 00 00 00 11 00 00 00 4e 00 00 00 00 00 00 93 a3 |.......N........|
View tls12_check.ps1
# Copyright (C) Oliver 'kfsone' Smith (oliver@kfs.org, https://www.kfs.org/oliver) 2021
#
# Trivial powershell script to test whether a given host is reachable and supports TLS 1.2.
Param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true, HelpMessage="Specify the dns name or ip address of the imap/tls server")]
[String] $Server,
[Parameter(HelpMessage="Specify the port number to contact, default 143")]
[Int] $Port = 143
)
@kfsone
kfsone / lex.ol
Created May 2, 2021
with comments :)
View lex.ol
package; Lex
// Input is expected to be unsigned 8-bit ascii values (0..255), so we'll alias
// uint8 as our character_type.
alias; char_t = uint8_t
// "enum" does not allow values specified inside the compound, although we could do
// this in the 'enum' directive (i.e before the ;), e.g. // enum from=-1; Name { ... }
// enum also only allows either all-on-one-line or one-per-line,
enum:
@kfsone
kfsone / lex.ol
Created May 2, 2021
without comment
View lex.ol
package; Lex
alias; char_t = uint8_t
enum:
ParserState {
Uninitialized
Parsing
EOF
}
@kfsone
kfsone / python-perf.ipynb
Created Apr 17, 2021
Optimizations in Python
View python-perf.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:c55c75850bb646f62f152f98645b6272
+ mkdir build
+ cd build
+ cmake --version
cmake version 3.20.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
+ CC=gcc-10
+ CXX=g++-10
+ cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON
-- The CXX compiler identification is GNU 10.2.1
View gist:08956cdb42ed13c35a433ee5be24f840
example/bools/parser/productionstable.go
diff -u example/bools/parser/productionstable.go.orig example/bools/parser/productionstable.go
--- example/bools/parser/productionstable.go.orig 2021-03-19 10:59:15.160000000 -0700
+++ example/bools/parser/productionstable.go 2021-03-19 10:59:15.160000000 -0700
@@ -2,7 +2,9 @@
package parser
-import ( "github.com/goccmack/gocc/example/bools/ast" )
+import (
View gist:f24d07be7e686010c386d960421d4cf4
make install
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
go install .
make[1]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
make -C example regenerate
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example'
make -C astx regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/astx'
gocc ast.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/astx'
View gist:10320268448f70e0a0391d7bb7e09480
go vet -methods=false .
go get github.com/kisielk/errcheck@v1.2.0
go: finding github.com v1.2.0
go: finding github.com/kisielk v1.2.0
errcheck -exclude .errcheck-ignore ./...
View gist:6f6d57ad7dbf37045e226d014a3681aa
make install
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
go install .
make[1]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc'
make -C example regenerate
make[1]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example'
make -C astx regenerate
make[2]: Entering directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/astx'
gocc ast.bnf
make[2]: Leaving directory '/mnt/c/Users/oliver/go/src/github.com/kfsone/gocc/example/astx'