Welcome to jotaki.github.io. Formally
spiryx.net. The purpose of this
website
is to create a place where I can place various bits of
information. It also serves as a place for me to dabble and tinker with
CSS, JavaScript, and HTML.
This page requires a modern Web Browser with JavaScript enabled in order to function and look proper. If you are having issues with this webpage please consider updating your browser to a later version. This webpage is also not considered to be mobile friendly. How it looks, and functions on a mobile device is unknown, and is not expected to be supported any time in the near future. Users with accessibility issues, and of Internet Explorer may also find it difficult to navigate this page.
The intended content of this page is mostly documentation related. With the occassional javascript rich application.
This site is in a state of construction. Sections may be incomplete, and/or broken. Sections may also change, move, or be removed entirely all together.
This page intends to serve as uselessness.
For the same reason anything happens.
The multiplication triangle is just the multiplication table read diagonally. For example, if we look at this simple 5x5 multiplication table and transpose it, you will quickly see what I mean.
↙ ↙ ↙ ↙ ↙ 1 2 3 4 5 1 1 ↗ 2 4 6 8 10 2 2 2 2 ↗ 3 6 9 12 15 -> 3 4 3 -> 3 4 3 ↗ 4 8 12 16 20 4 6 6 4 4 6 6 4 ↗ 5 10 15 20 25 5 8 9 8 5 5 8 9 8 5 ↗
Click here for a better example.
What's fascinating about reading the multiplication table like this, is it
reveals some very interesting patterns. Before we get into that though, it
would be helpful if we could generate the triangle table. For that, we will
use the following function. Where r is the row, and c is the
column.
g(r, c) -> c * (r - (c - 1))
Not only can we use row and column values to retrieve a value, but we can also use a simple N-lookup. What I mean is, to find say the 30'th table entry, we need only the following formula:
f(n) ->
r = sqrt(2*n)
r += ((r*(r+1))/2+1 <= n)
c = n - (r*(r-1))/2
c * (r - (c - 1)) /* should look familiar */
N in this case is an index retrieved by the following function:
f(r, c) -> r*(r-1)/2 + c
If you are not familiar, you should know that the sum of N odds is the value of N², and that the sum of N evens is the value of N*(N+1). This gives us the resulting formula that the sum of consecutive numbers is: (N*(N+1))/2.
As we read the multiplication table as a triangle we come to see that each row is merely the sum of it's terms less one. For example, we know that 2*5 = 10. This means that we should find 10 on row 6 (2+5-1), and columns 2, and 5. In this way, we could come to see that this table is really a representation of the following sequence:
1.) 1 * 1 2.) 2 * 1, 1 * 2 3.) 3 * 1, 2 * 2, 1 * 3 4.) 4 * 1, 3 * 2, 2 * 3, 1 * 4 5.) 5 * 1, 4 * 2, 3 * 3, 2 * 4, 1 * 5 6.) 6 * 1, 5 * 2, 4 * 3, 3 * 4, 2 * 5, 1 * 6 …
This means that the center value for a given row can be calculated quite easily, since it will always be N² or N(N+1) depending on whether or not the given N is even or odd. The formula for this can be found below.
Knowing the sum of all values, whose factors add up to some N could be useful. Somewhere, maybe. probably not.;; n is row
f(2n) = (n/2)(n/2+1) f(2n+1) = ((n+1)/2)^2 f(n) -> r = (n + (n % 2)) / 2;; r = (n+1)/2 if odd, n/2 if even
r * (r + (1 - (n % 2)));; r^2 if odd, r*(r+1) if even
f(2n+1) ->
m = (n+1)/2
2 * (m^3 - (m*(m-1)*(2*(m-1)+1)/6)) - m^2
f(2n) ->
; eh? haven't bothered to deduce this yet
When we consider A*B, what can we really know?
a*b = c (2n+1)
Q = (a+b)/2
W = (a-b)/2
R = 2*Q-1
C = Q - W
I = R*(R-1)/2 + C
N = C * (R - (C - 1))
B = C ;; (Q - W) -> ((a+b)/2) - ((a-b)/2) -> 2*b/2 -> b
A = (R - (C - 1))
N == A * B == Q² - W² == c
# check ``man 1 ssh-keygen'' for details.
ssh-keygen -f ~/.ssh/mykey -t rsa -b 2048 -C "key for myhost"
# check ``man 1 ssh-keygen'' for details.
ssh-keygen -f myhostca.ca -t rsa -b 4096 -C "CA For my host"
# check ``man 1 ssh-keygen'' for details
ssh-keygen -s myhostca.ca \
\ -I identifier \
\ [-n principles] \
\ [-V validity_interval ] \
\ myusersey.pub
# check ``man 1 ssh-keygen'' for details.
ssh-keygen -Lf myuserkey-cert.pub
\myuserkey-cert.pub:
\ Type: ssh-rsa-cert-v01@openssh.com user certificate
\ Public key: RSA-CERT SHA256:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef...
\ Signing CA: RSA SHA256:rstuvwxyz0123456789abcdefghijklmnopqr...
\ Key ID: "myuserkey"
\ Serial: 0
\ Valid: forever
\ Principals: (none)
\ Critical Options: (none)
\ Extensions:
\ permit-X11-forwarding
\ permit-agent-forwarding
\ permit-port-forwarding
\ permit-pty
\ permit-user-rc
# check ``man 1 s_client'' for details
openssl s_client -connect www.google.com:443
# see ``man 1 req'' for more details.
openssl req -x509 \
\ -newkey rsa:2048 \
\ -keyout server.pem \
\ -out server.pem \
\ -days 30 \
\ -subj '/C=.../ST=.../L=.../O=.../OU=.../CN=.../emailAddress=.../' \
\ [ -nodes ] # no password.
# see ``man 1 s_server'' for more details.
openssl s_server -accept 4443 \
\ -cert server.pem \
\ -key server.pem
gcd(a,0) = a
gcd(a,b) = gcd(b,a%b)
inverse(a, b) ->
t = 0, tk = 1;
r = b, rk = a;
while rk ≠ 0 ->
q = r/rk;
m = t-q*tk;
t = tk, tk = m;
m = r-q*rk;
r = rk, rk = m;
;;
(r > 1? 0:
t + (t < 0? b: 0))
;;
lcm(a,b) = b * (a/gcd(a,b));
reverse(0, o, b) = o
reverse(i, o, b) ->
reverse(floor(i/b), o*b+(i%b), b);
;;
Example:
reverse(351, 0, 10) ->
reverse(35, 1, 10) ->
reverse(3, 15, 10) ->
reverse(0, 153, 10) = 153
d(n,b) ->
((n-1) % (b-1)) + 1
;;
This is where I'd place an about me page, if I cared about that sort of thing.
According to their website
OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options.
OpenSSH consists of several different applications, used for a variety of different purposes. But all, utimately aiming to give you secure remote access to a machine that is listening on a port capable of speaking the SSH Protocol. Here is a quick list of applications you can expect to find when you install OpenSSH.
SSH stands for Secure Shell, and consists of several layers documented over several RFC's. To speak extensively about these would be out of scope for this document. However, for completeness sake they should be mentioned. In short, we will say that the SSH protocol enables a secure transport over an insecure network.
sudo apt-get install openssh-server
sudo yum install openssh-server
sudo emerge net-misc/openssh
If you are running Linux, chances are, you already have OpenSSH installed. However, if for some reason OpenSSH is not installed. You can obtain a copy by checking with your distributions package management resource or by visiting https://www.openssh.com/ and following the correct links which correspond to your operating system.