Skip to content

Instantly share code, notes, and snippets.

View peerasak-u's full-sized avatar

Peerasak Unsakon peerasak-u

View GitHub Profile
@peerasak-u
peerasak-u / opencode-openmemory-improvement-spec.md
Last active March 4, 2026 05:10
OpenMemory Plugin Improvement Spec - Project Identity Configuration System

OpenMemory Plugin Improvement Specification

Project Identity Configuration System (Simplified v2.1)


1. Problem Statement

Current Limitations

The existing OpenMemory plugin uses SHA256 hashing of absolute directory paths to generate project identifiers:

🚀 Xcode Lazy Coder Service 🛌

A macOS service for those Xcode wizards 🧙 who sometimes just want to take the easy road. Generates a quirky formatted string with your file name and selected code, copies it straight to your clipboard, and magically opens a specified website.✨

🌈 Features

  • 📜 Formatted String Generation: Pops out a string like:
    ARE YOU LAZY?
    FILENAME:  {{FILE_NAME_FROM_XCODE}}
    
import Foundation
protocol PresenterView: class {
func updateLabel()
}
class Presenter {
weak var view: PresenterView?
// Pass something that conforms to PresenterView
init(with view: PresenterView) {
self.view = view
}
const getShowtimes = () => {
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const range = spreadsheet.getSheetByName('ShowTime').getRange('A2:D');
const values = range.getValues();
const showtimes = values.filter((val) => val[0]).map(mappingShowTime);
const incoming = showtimes.filter(isIncoming)
const showing = showtimes.filter(isShowing)
const alreayShown = showtimes.filter(wasAlreadyShown)
const axios = require('axios');
const fetchState = async (projectId) => {
let result = await axios(
`http://167.99.72.166:3800/projects/${projectId}/state`,
);
return result.data;
};
const fetchSummary = async (projectId, status) => {
const fetchSheet = async (sheetId) => {
try {
var records = []
const response = await fetch(
`https://spreadsheets.google.com/feeds/list/${sheetId}/od6/public/values?alt=json`,
);
const responseJson = await response.json();
const { entry } = responseJson.feed;
records = entry.map(row => ({
column1: row.gsx$column1.$t,
@peerasak-u
peerasak-u / rooms.mock.json
Last active November 8, 2019 09:54
rooms.mock.json
[
{
"id": "5dc53b5ee7ad9e06d7d73bf7",
"current_pod_id": "5dc53b5e5d65fd00317cb4b7",
"floor": 4,
"deliver_date": "2020-07-14T09:45:31 -07:00",
"status": "COMPLETE"
},
{
"id": "5dc53b5e48006d959450afd0",
const puppeteer = require('puppeteer');
const track = async (number) => {
//launch headless browser and go to web page
const browser = await puppeteer.launch();
const page = await browser.newPage();
const url = 'http://track.thailandpost.co.th/tracking/default.aspx'
await page.goto(url);
//waiting for slider
await page.waitFor('.ui-draggable')
<template lang="pug">
v-container(fluid)
v-row(
align="center"
justify="center"
)
template(v-for="item in registerTypes")
v-col(cols="12" sm="5" md="4" lg="3" :key="item.headline")
type-card(
:headline="item.headline"
@peerasak-u
peerasak-u / ATK.js
Last active May 30, 2019 19:49
บริจาคให้แก่กลุ่มเพื่อน นป.
let zoneIndex = 0;
let zoneCount = 0;
const waitForElement = (selector, retryTimes = 400) => {
return new Promise((resolve, reject) => {
const findElement = (_selector, _retried) => {
const element = document.querySelector(_selector);
if (!element) {
if (_retried < retryTimes) {
window.requestAnimationFrame(() => findElement(_selector, _retried + 1));