Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing on 1%

Andrew Katasonov akatasonov

🎯
Focusing on 1%
Block or report user

Report or block akatasonov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@akatasonov
akatasonov / config.json
Created Jul 22, 2019 — forked from lmakarov/config.json
microk8s crypto mining exploit
View config.json
{
"algo": "cryptonight",
"api": {
"port": 0,
"access-token": null,
"id": null,
"worker-id": null,
"ipv6": false,
"restricted": true
},
View gist:138d8056cc0f6d854160c4a7d5254859
Pool finds block 4300 - https://grinscan.net/block/4300
Secondary scale = 529
Pool accepts minimum difficulty shares for pow each size
scale = factor = Scaling difficulty =
for primary pow (cuckatooN solution) where N>=31 = 2^(1+EDGEBITS-24)*N
for secondary pow - (cuckatoo29 solution) = variable, retargeted every block, stored as header field "secondary_scaling"
Example: Three workers contributed shares:
@akatasonov
akatasonov / tokens.md
Created Jan 19, 2019 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication
View tokens.md

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Preconditions:

В данной заметке рассматривается работа JWT с симметичным алгоритмом шифрования (HS256/HS384/HS512)

Основы:

Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

@akatasonov
akatasonov / hyper.js
Created Mar 5, 2018 — forked from TimothyCole/hyper.js
My Hyper Term config - w/ One Dark theme
View hyper.js
module.exports = {
config: {
fontSize: 13,
fontFamily: '"Fira Code", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace, "Droid Sans Mono for Powerline"',
cursorColor: 'rgba(33, 150, 243, 0.75)',
cursorShape: 'BLOCK',
foregroundColor: '#abb2bf',
backgroundColor: '#202731',
borderColor: '#1C222B',
css: `body {
@akatasonov
akatasonov / gist:81ddc527106ad8d5649f9f90fd0ec9c9
Created Dec 1, 2017 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:81ddc527106ad8d5649f9f90fd0ec9c9
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@akatasonov
akatasonov / AndroidManifest.xml
Last active Sep 24, 2015
Example of implementation of Google Cloud Messaging for Android
View AndroidManifest.xml
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.katasonov.everporter.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.katasonov.everporter.permission.C2D_MESSAGE" />
<receiver
android:name=".GcmBroadcastReceiver"
You can’t perform that action at this time.