Skip to content

Instantly share code, notes, and snippets.

View tomoima525's full-sized avatar
🎯
Focusing

tomo tomoima525

🎯
Focusing
View GitHub Profile
@tomoima525
tomoima525 / agent loop
Created March 10, 2025 20:00 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@tomoima525
tomoima525 / settings.json
Last active April 8, 2025 13:23
settings.json for Cursor(VSCode)
{
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"explorer.confirmDelete": false,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 120,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.formatOnType": true,
"peacock.favoriteColors": [
@tomoima525
tomoima525 / curl.md
Created December 2, 2022 21:02 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@tomoima525
tomoima525 / blerp.js
Created November 8, 2022 18:00 — forked from botagar/blerp.js
Javascript implementation of Bilinear Interpolation
Math.blerp = function (values, x1, y1, x2, y2, x, y) {
let q11 = (((x2 - x) * (y2 - y)) / ((x2 - x1) * (y2 - y1))) * values[x1][y1]
let q21 = (((x - x1) * (y2 - y)) / ((x2 - x1) * (y2 - y1))) * values[x2][y1]
let q12 = (((x2 - x) * (y - y1)) / ((x2 - x1) * (y2 - y1))) * values[x1][y2]
let q22 = (((x - x1) * (y - y1)) / ((x2 - x1) * (y2 - y1))) * values[x2][y2]
return q11 + q21 + q12 + q22
}
@tomoima525
tomoima525 / playground.rs
Last active September 18, 2021 06:48 — forked from rust-play/playground.rs
Code shared from the Rust Playground
// Implementing Vector
pub struct ToyVec<T> {
elements: Box<[T]>,
len: usize,
}
// Reference type field requires lifetime specifier
pub struct Iter<'vec, T> {
elements: &'vec Box<[T]>,
len: usize,
@tomoima525
tomoima525 / playground-2.rs
Last active September 17, 2021 21:35 — forked from rust-play/playground.rs
Code shared from the Rust Playground
// use std::cell::RefCell;
// Ownership: Copy semantic
// Copy trait should not have Drop trait implemented
#[derive(Debug, Clone, Copy)]
struct Parent(usize, Child, Child);
#[derive(Debug, Clone, Copy)]
struct Child(usize);
@tomoima525
tomoima525 / playground.rs
Created September 17, 2021 18:11 — forked from rust-play/playground.rs
Code shared from the Rust Playground
// use std::cell::RefCell;
// Ownership
use {
std::ops::Drop
};
#[derive(Debug)]
struct Parent(usize, Child, Child);
#[derive(Debug)]
@tomoima525
tomoima525 / CustomNativeModule.kt
Created December 18, 2020 09:09
Replace ReactPackage with TurboReactPackage
// ReactModule annotation is required to create reactModuleInfoMap
@ReactModule(name = "CustomBackground")
class CustomBackgroundNativeModule(context: ReactApplicationContext): ReactContextBaseJavaModule(context) {
override fun getName(): String = "CustomBackground"
@ReactMethod
fun hide() {}
@ReactMethod
fun show() {}
{
"aps" : {
"alert" : {
"title" : "Game Request",
"body" : "Bob wants to play poker",
"action-loc-key" : "PLAY"
},
"badge" : 5
},
"acme1" : "bar",
@tomoima525
tomoima525 / getResizedBitmap.kt
Created February 5, 2020 08:45
resize bitmap
suspend fun getResizedBitmap(bm: Bitmap, newWidth: Int, newHeight: Int): Bitmap {
return withContext(Dispatchers.IO) {
val width = bm.width
val height = bm.height
val scaleWidth = newWidth.toFloat() / width
val scaleHeight = newHeight.toFloat() / height
val matrix = Matrix()
matrix.postScale(scaleWidth, scaleHeight)