Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / odoo-10.sh
Created November 7, 2025 09:47
odoo-10
#!/bin/sh
# https://unkkuri.com/blog/unkkuri-blog-1/post/install-odoo-version-10-in-docker-3
#
docker create --name unkkuri-db-data library/postgres:9.4 /bin/true
docker run -d --name unkkuri-db --env POSTGRES_USER=odoo --env POSTGRES_PASSWORD=unkkuri-secret-pw --volumes-from unkkuri-db-data library/postgres:9.4
docker logs unkkuri-db
# LOG: database system is ready to accept connections
docker create -v /var/lib/odoo --name unkkuri-odoo-data odoo:10.0 /bin/true
docker run -d --name unkkuri-odoo --link unkkuri-db:db -p 8069:8069 --volumes-from unkkuri-odoo-data odoo:10.0 odoo --db_password=unkkuri-secret-pw
docker logs unkkuri-odoo
@sefgit
sefgit / Rfc6238.cs
Last active October 23, 2025 03:05 — forked from ddjerqq/Rfc6238.cs
TOTP: Time-Based One-Time Password Algorithm Implementation in C#
using System.Security.Cryptography;
namespace Rfc6238;
public enum HmacAlgo
{
Sha1,
Sha256,
Sha512,
}
@sefgit
sefgit / validateInitData.py
Created September 12, 2025 23:38 — forked from Malith-Rukshan/validateInitData.py
Validate Init data of Telegram Mini-App | TypeScript & Python
import hmac
def checkValidateInitData(hash_str, init_data, token, c_str="WebAppData"):
"""
Validates the data received from the Telegram web app, using the
method documented here:
https://core.telegram.org/bots/webapps#validating-data-received-via-the-web-app
hash_str - the has string passed by the webapp
init_data - the query string passed by the webapp
@sefgit
sefgit / demo-manifest.json
Last active September 14, 2025 06:48
demo-manifest.json
{
"url": "https://mini-app.local:5173",
"name": "CryptoX",
"iconUrl": "https://logoipsum.com/logoipsum-avatar.png"
}
npm install buffer
import { Buffer } from 'buffer';
globalThis.Buffer = Buffer;
npm install -D vite-plugin-node-polyfills
@sefgit
sefgit / sha512.html
Created August 18, 2025 13:47 — forked from grazerblade/sha512.html
SHA512 hash converter via Javascript (from the orig cryptostorm.is website)
<meta name="description" content="Easily calculate SHA-512 algorithms" />
<script type="text/javascript" src="assets/js/sha512.js">
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
//<![CDATA[
function calcSHA()
{
calcHash("SHA-512");
@sefgit
sefgit / simulateNativeLink.js
Created August 14, 2025 12:59 — forked from smitroshin/simulateNativeLink.js
Simulate native link click programmatically in React.js
@sefgit
sefgit / ImpPubKeyFromPriv.c
Created August 4, 2025 05:08 — forked from aleks-f/ImpPubKeyFromPriv.c
CryptoAPI: import public key from private key PEM
#include "windows.h"
#include "wincrypt.h"
#include "stdio.h"
/* This code example:
1) creates a Crypto Service Provider
2) generates keys
3) extracts public key
4) exports private key into PEM
dir "." -Recurse | Unblock-File
Get-ChildItem "." -Recurse -Include *.dll | Unblock-File
@sefgit
sefgit / scroll.html
Last active June 27, 2025 10:21
auto scroll
<html>
<head>
<style>
html {
background-color: black;
color:darkgray;
overflow: hidden;
}
#logger {
padding-top:20px;