Skip to content

Instantly share code, notes, and snippets.

@isopen
isopen / nasm_tdjson_example.asm
Created September 21, 2025 11:17
nasm_tdjson_example
; TDLib Minimal Linux Client in x86-64 Assembly (NASM)
;
; nasm -f elf64 -o nasm_tdjson_example.o nasm_tdjson_example.asm
; gcc -o nasm_tdjson_example nasm_tdjson_example.o -ldl -no-pie
; ./nasm_tdjson_example
section .data
; Error messages
lib_error db "Error: libtdjson.so not found", 10, 0
client_error db "Error: Failed to create client", 10, 0
() recv_external(slice in_msg) impure {
var signature = in_msg~load_bits(512);
var cs = in_msg;
var (msg_seqno, valid_until, stored_seqno, public_key) = (cs~load_uint(32), cs~load_uint(32), get_data().begin_parse().load_uint(32), get_data().begin_parse().load_uint(256));
throw_if(35, valid_until <= now());
throw_unless(33, msg_seqno == stored_seqno);
throw_unless(34, check_signature(slice_hash(in_msg), signature, public_key));
accept_message();
cs~touch();
while (cs.slice_refs()) {
I. TON Ducks
1.
video: https://t.me/tonplay_chat/271/1229
I wanted to set a new world record for TON Ducks, but under the onslaught of two bulls, "Duck" flew into textures.
I think you need to check the field bounds check in TON Ducks (validation doesn't always work).
2.
- video: https://t.me/tonplay_chat/271/1155
AI is not very good at avoiding obstacles as I mentioned above, but then it turned out that his damage does not blow boxes.
<?php
...
/**
* https://github.com/yiisoft/yii/issues/1197
*
* @param bool $resetDefault
*
* @return $this|GxActiveRecord
*/
public function resetScope($resetDefault = true)
@isopen
isopen / categories.rb
Created December 13, 2019 10:21
if scripts are executed sequentially, then remove the static dependency calls
...
nod_bench = Benchmark.measure do
input_file = ...
...
@isopen
isopen / news.rb
Created December 12, 2019 21:50
hot)fix
...
lang.each do |section|
articles = Utils.get_articles(json, section)
next unless articles
...
end
...
<?php
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class AppDefaultAuthenticator extends AbstractGuardAuthenticator implements AuthenticatorInterface
{
...
private $session;
...
public function __construct(SessionInterface $session) {
<?php
...
/**
* @ORM\Column(type="datetimetz", unique=false)
*/
private $created_at;
/**
* @ORM\Column(type="datetimetz", unique=false)
*/
private $updated_at;
[ 3][t 4][1561985602.845554113][Td.cpp:4380][#1][!Td][&td_requests] Sending update: updateOption {
name = "version"
value = optionValueString {
value = "1.4.0"
}
}
[ 3][t 4][1561985602.846087217][Td.cpp:4380][#1][!Td][&td_requests] Sending update: updateAuthorizationState {
authorization_state = authorizationStateWaitTdlibParameters {
}
}
...
val startMain = Intent(Intent.ACTION_MAIN)
startMain.addCategory(Intent.CATEGORY_HOME)
startMain.flags = Intent.FLAG_ACTIVITY_NEW_TASK
startActivity(startMain)
...