Skip to content

Instantly share code, notes, and snippets.

View 7flash's full-sized avatar
🎯
Focusing

B. GOR 7flash

🎯
Focusing
  • Telegram @galaxygur
  • X @berliangor
View GitHub Profile
#!/usr/bin/env bun
import * as fs from 'fs';
import * as path from 'path';
// --- Function for Usage Message ---
function usage(): never {
console.log(`Usage: bun run ${process.argv[1]} <input_file> [--cwd <root_directory>]`);
console.log('');
console.log('Processes <input_file>, replacing file paths with their contents,');
console.log('and for directory paths, listing all files (non-recursively) with their contents.');
@7flash
7flash / tb_tictactoe_predictor.v
Created September 28, 2025 01:16
sept28-ttt-llm-verilog
// Testbench for tictactoe_predictor
// Simulates inputs, dumps waves for visualization
`timescale 1ns / 1ps
module tb_tictactoe_predictor;
reg [31:0] input_bits;
wire [3:0] output_pos;
// Instantiate the DUT (Design Under Test)
@7flash
7flash / bot.rb
Created March 23, 2024 09:20 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.9;
// https://github.com/yieldyak/yak-aggregator/blob/master/src/contracts/interface/IAdapter.sol
interface IAdapter {
function name() external view returns (string memory);
function swapGasEstimate() external view returns (uint256);
function swap(
did:3:kjzl6cwe1jw14a8o3jsdd84lvq2nmji1zy441jtu7kp7j5cvq7ub9idjs0fk35p
did:3:kjzl6cwe1jw1462ydxl38pilbc4k06ajh5ugwxo2dkrrvlg86bxdjd1u76lciag
#
# Panoramix v4 Oct 2019
# Decompiled source of 0x4f4e0f2cb72E718fC0433222768c57e823162152
#
# Let's make the world open source
#
#
# I failed with these:
# - unknowna270ef06(?)
# All the rest is below.
local notifications:
https://pub.dev/packages/flutter_local_notifications
A library useful for creating fuzzy timestamps. (e.g. "5 minutes ago")
https://pub.dev/packages/timeago
rating widgets:
https://pub.dev/packages/smooth_star_rating
https://pub.dev/packages/flutter_rating
pragma solidity ^0.4.24;
interface IToken {
function name() external view returns(string);
function symbol() external view returns(string);
function decimals() external view returns(uint8);
function totalSupply() external view returns (uint256);
@7flash
7flash / flatten.js
Created July 8, 2017 15:08 — forked from arvinsim/flatten.js
Code to flatten an array of arbitrarily nested arrays of integers into a flat array of integers.
// NodeJS
const assert = require('assert');
/**
* Flatten an array of arbitrarily nested arrays of integers into a flat array of integers.
* e.g. [[1,2,[3]],4] -> [1,2,3,4].
*
* @name flatten
* @param {Array} arr An array to flatten, nested or otherwise
* @returns {Array} the flattened array