Skip to content

Instantly share code, notes, and snippets.

View frontsideair's full-sized avatar

Fatih Altinok frontsideair

View GitHub Profile
@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.

@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.
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 / Link.tsx
Last active August 8, 2022 14:29
Next.js Link to Remix Link migration
@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 / 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 / __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 / 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 / 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 / does-your-web-app-work-without-javascript.md
Created April 10, 2020 21:25
Does your web app work without JavaScript?

Does your web app work without JavaScript?

I'm currently running an experiment. I'm building a non-trivial web app using JavaScript, which should work with no missing functionality if JavaScript is disabled. That's an undertaking for sure, but it's how it used to be in the olden times. I just wanted to try to build a product using the web fundamentals where JavaScript would only enhance the experience and not be a requirement. Call it graceful degradation taken to the extreme.

How did I do it? My framework of choice was Next.js, which was actually an inspiration to this experiment. With Next.js you make pages using React.js and Next.js handles everything for you. What do I mean by everything? When you make a request to the server, Next.js gathers the required data to render the page and sends the HTML along with the required JavaScript and it is rehydrated on the client. When you navigate to another page, something magical happens. The Next.js runtime actually fetches the scripts required for the navigated