Skip to content

Instantly share code, notes, and snippets.

@LCamel
LCamel / with version
Last active July 25, 2025 09:12
editTexts 的 callback 中, 即便晚了 10 秒再去 readSource, 讀到的也是舊的. 但隨後的 didChange 去讀就能讀到新的.
Jul 25 16:53:05 json: decoding request
Jul 25 16:53:05 JSON content: {"filePath":"/workspaces/gcl-all/gcl-vscode/example/gcd.gcl"}
Jul 25 16:53:05 json: decoding succeeded
Jul 25 16:53:05 Reload handler >>>> /workspaces/gcl-all/gcl-vscode/example/gcd.gcl
Jul 25 16:53:05 load: start
Jul 25 16:53:05 ask file state ref
Jul 25 16:53:05 ask file state map
Jul 25 16:53:05 lookup file state map
Jul 25 16:53:05 found
Jul 25 16:53:05 readSource: version: 3
@LCamel
LCamel / digHoles.log
Last active July 23, 2025 03:29
GCL digHoles: old source
json: decoding request
JSON content: {"filePath":"/workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl"}
json: decoding succeeded
Reload handler >>>> /workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl
load: start
ask file state ref
ask file state map
lookup file state map
found
source read
@LCamel
LCamel / node version
Created June 25, 2025 06:28
VS Code crashes sometimes
vscode ➜ /workspaces/gcl-all/gcl-vscode/example (main) $ /vscode/vscode-server/bin/linux-x64/18e3a1ec544e6907be1e944a94c496e302073435/node
Welcome to Node.js v22.15.1.
Type ".help" for more information.
>
@LCamel
LCamel / fullscreen1.sh
Last active February 19, 2025 14:09
Mac OS X fullscreen
#!/bin/sh
osascript -e 'tell application "System Events" to set frontApp to (name of first process whose frontmost is true)' -e 'tell application "System Events" to tell process frontApp to set position of window 1 to {0, 0}' -e 'tell application "System Events" to tell process frontApp to set size of window 1 to {1512, 3000}'
@LCamel
LCamel / a.html
Created February 6, 2025 07:21
a.html
<img src="https://lcamel.github.io/LCamel-Notes/LazyTower/level_digests.png" width="431px">
@LCamel
LCamel / a.svg
Created February 6, 2025 04:04
a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LCamel
LCamel / false_positive.js
Last active May 29, 2023 14:12
False positives for the LessThan circuit (caused by overflow)
// https://github.com/iden3/circomlib/blob/master/circuits/comparators.circom
const p = 23;
const N = 2;
var fp = []; // false positive
for (var x = 0; x < p; x++) {
fp[x] = [];
for (var y = 0; y < p; y++) {
fp[x][y] = ' ';
@LCamel
LCamel / PickOne.circom
Last active May 27, 2023 12:33
PickOne experiments
pragma circom 2.1.4;
include "circomlib/multiplexer.circom";
include "circomlib/comparators.circom";
// Pick in[sel]
template PickOne(N) {
signal input in[N];
signal input sel;
signal output out;
@LCamel
LCamel / a.txt
Created May 24, 2023 13:23
upgrade poseidon-solidity from 0.0.4 to 0.0.5 will solve this problem
% yarn workspace hashtower.sol test
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> poseidon-solidity/PoseidonT3.sol:4:1:
|
4 | library PoseidonT3 {
| ^ (Relevant source part starts here and spans across multiple lines).
Compiled 3 Solidity files successfully
@LCamel
LCamel / a.txt
Created May 24, 2023 10:04
hashtower.sol
% yarn workspace hashtower.sol test:coverage
Version
=======
> solidity-coverage: v0.8.2
Instrumenting for coverage...
=============================
> HashTowerHashChain.sol