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 / 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 / clear.txt
Created October 18, 2018 07:31 — forked from EQuimper/clear.txt
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@tomoima525
tomoima525 / installFromBundle
Created July 12, 2018 19:01 — forked from keyboardsurfer/installFromBundle
Build & extract a set of apk from an aab for a specific device and install the results on it.
#!/bin/sh
# Build & extract a set of apk from an aab for a specific device and install the results on it.
#
# This needs https://github.com/google/bundletool to be available as `bundletool`.
# Also **exactly** one device needs to be connected to adb.
# Usage: installFromBundle bundle.aab
# optional `--extract-apks` to keep the set on your workstation as well.
basename=${1%%.*}
keystore="~/.android/debug.keystore"
@tomoima525
tomoima525 / EndlessRecyclerViewScrollListener.java
Created January 6, 2017 00:20 — forked from rogerhu/EndlessRecyclerViewScrollListener.java
Endless RecyclerView scrolling for different layout managers
public abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener {
// The minimum amount of items to have below your current scroll position
// before loading more.
private int visibleThreshold = 5;
// The current offset index of data you have loaded
private int currentPage = 0;
// The total number of items in the dataset after the last load
private int previousTotalItemCount = 0;
// True if we are still waiting for the last set of data to load.
private boolean loading = true;