Skip to content

Instantly share code, notes, and snippets.

View frontsideair's full-sized avatar

Fatih Altinok frontsideair

View GitHub Profile
@frontsideair
frontsideair / number_game_prompt_template.md
Created September 7, 2025 09:01
Number game prompt template

You are a friendly number‑guessing helper. The user will play a simple “Guess the Number” game with you.

Game Rules

  1. Start of a New Game
    • When the user says “yes, let’s start” (or any affirmative phrase),
      call the JavaScript function once to generate an integer target between 1 and 100 (inclusive).
    • Keep that number in memory; do not reveal it.
    • Reply: “I’ve chosen a number between 1 and 100. What’s your first guess?”
  • During an active game, the assistant must never invoke any tools (including functions.run_javascript). Tool calls are only allowed when starting a new game.
@frontsideair
frontsideair / daybreak_box_art_gemma3_12b.md
Created September 8, 2025 12:18
Daybreak art movement and theme

https://www.daybreakgame.org/assets/daybreak-box.png

User: Describe the visual style and thematic mood of this board game box art. Then, name one major art movement that influenced the visual design, and one cultural or ideological theme that shaped its message. Justify both choices clearly and concisely.

Assistant: Here's a breakdown of the visual style, mood, art movement influence, and thematic message of the board game box art:

Visual Style & Mood:

The visual style is characterized by bold, stylized shapes and a limited color palette (primarily yellows, blues, greens, and purples). It features geometric abstraction, with simplified representations of landscapes (wind turbines, cityscapes, solar panels) and figures. The overall mood is optimistic and forward-looking, conveying a sense of progress, innovation, and perhaps even a touch of utopian idealism. The use of bright colors and clean lines contributes to this positive feeling.

function cnx(strings, ...keys) {
const ret = []
for (let i = 0; i < strings.length + keys.length; i++) {
if (i % 2 === 0) {
const index = i / 2
ret.push(strings[index].trim())
} else {
const index = (i - 1) / 2
const key = keys[index]
if (typeof key === 'string') {
@frontsideair
frontsideair / __puanlama.md
Last active December 2, 2024 07:20
HANGİ TÜRKİYE FENOTİPİ İLE DAHA ÇOK UYUŞUYORSUN?

Yüz Uzunluğun?

Kısa(Yuvarlak yüz)

  • TÜRK (YÖRÜK , TATAR , ANADOLU TÜRKMENİ - MANAV-) 2
  • BALKAN MUHACİRİ(BULGAR , BOŞNAK , POMAK , MAKEDON , ARNAVUT , KOSOVALI , BALKAN TÜRKMENİ)) 1
  • DOĞU ANADOLU / ERMENİ / AZERİ 1

Orta

  • TÜRK (YÖRÜK , TATAR , ANADOLU TÜRKMENİ - MANAV-) 1
@frontsideair
frontsideair / _jsonify.ts
Last active July 22, 2024 03:29
Jsonify TypeScript helper type
// based on this blog: https://effectivetypescript.com/2020/04/09/jsonify/
type Invalid = undefined | Function | symbol;
export type Jsonify<T> = T extends { toJSON(): infer U }
? U
: T extends BigInt | Invalid
? never
: T extends Number
? number
@frontsideair
frontsideair / require-without-installing.js
Last active July 4, 2024 16:50
Use npx to require packages without installing, proof-of-concept
#!/usr/bin/env node
const npx = require('libnpx')
const path = require('path')
const packageName = "figlet"
const NPM_PATH = path.join(__dirname, 'node_modules', 'npm', 'bin', 'npm-cli.js')
npx._ensurePackages(packageName, { npm: NPM_PATH })
.then(results => {
const package = require(path.join(results.prefix, 'lib', 'node_modules', packageName))
@frontsideair
frontsideair / Link.tsx
Last active August 8, 2022 14:29
Next.js Link to Remix Link migration
@frontsideair
frontsideair / route.jsx
Created February 3, 2021 06:51
Experimental full-stack React framework API
import db from "./db"
export async function get({ queryParams }) {
try {
const user = await db.getUser(queryParams.userName);
if (user) {
return {
status: 200,
body: {
user,
@frontsideair
frontsideair / Main.purs
Created May 31, 2020 13:18
List members of union in PureScript
module Main where
import Prelude
import Data.Enum
import Data.Maybe
import Data.List
import Effect
import TryPureScript
@frontsideair
frontsideair / do-we-really-need-node_modules-or-npm.md
Created April 9, 2020 09:05
Do we really need `node_modules` or `npm`?

Do we really need node_modules or npm?

I remember thinking that the way we're doing JavaScript is complex but we don't have any choice. What we've been doing for the last few years is that we are downloading a lot of JavaScript modules from npm to ournode_modules folder and we transform and bundle it for browsers using webpack and babel. This was necessary because browsers didn't have support for new features, most importantly module support and sending a lot of separate files to the browser was inefficient, so we transformed and bundlead ahead-of-time.

Now the times are changing. Many popular browsers support the crucial features including module support and HTTP/2 makes it more efficient to send a bunch of files. But we're stuck with the old ways now, and we're paying the price for what made sense at the time. As it turns out putting al your JavaScript in one bundle is not that efficient either, since you're sending non essential code which makes it load and parse slower thus affecting the us