Skip to content

Instantly share code, notes, and snippets.

View akkartik's full-sized avatar

Kartik Agaram akkartik

View GitHub Profile
@akkartik
akkartik / new.md
Last active October 10, 2023 16:20
Shopify ToS 2023-11-06

Shopify Consumer Terms of Service https://shop.app/terms-of-service-update

The Terms of Service will take effect on November 6, 2023. You can view the current Terms of Service here.

  1. Preamble

1.1. Welcome to Shopify! Shopify helps make it easier for you to shop and manage your purchases and to find products you love. These Terms apply when you access, use or interact with Shopify and our consumer services, including the Shop App, Shop Pay, Shopify features in a Merchant's store, Shopify integrations with your third-party email and shopping providers, or other products, features, tools, and services that we provide to you (“Shopify Consumer Services”).

1.2. These Terms form an agreement between the applicable Shopify entity defined below (“Shopify,” “Shop,” “we,” “our,” or “us”) and you (“you” or “your”) and represent the terms and conditions of your access to and use of the Shopify Consumer Services. The Shopify entity you contract with and providing the Shopify Consumer Services to you together with it

@akkartik
akkartik / search
Created September 7, 2023 23:06
search -- from the outside in and from the inside out
@akkartik
akkartik / main.lua
Last active December 24, 2023 14:50
Edit source code inside LÖVE with almost no constraints or limitations.
Slab = require 'Slab' -- idiomatic GUI: https://github.com/flamendless/Slab
-- default love.run from https://love2d.org/wiki/love.run with various callbacks wrapped in xpcall()
function love.run()
if love.load then love.load(love.arg.parseGameArguments(arg), arg) end
-- We don't want the first frame's dt to include time taken by love.load.
if love.timer then love.timer.step() end
local dt = 0
@akkartik
akkartik / unfurl-mastodon-thread.lua
Last active February 17, 2023 06:06
https example in Lua
-- https://github.com/rxi/json.lua
json = require 'json'
-- https://github.com/brunoos/luasec
https = require 'ssl.https'
-- Construct an URL to query the Mastodon API.
-- I have no idea if ActivityPub carves out the id space between federating
-- hosts (how would it even do that?!) so I'm going to remember two things for
-- each Mastodon link: a host and an id. The host includes the protocol.
function url_from_ml(ml)
@akkartik
akkartik / num.lua
Created June 11, 2022 21:24
A little number grid for preschool math exercises at home
-- To run:
-- Download LÖVE from https://love2d.org
-- Download this file to a directory and rename it to `main.lua`
-- Run the program from that directory.
-- * on Linux (using the appimage binary): `chmod +x path/to/love-11.4-x86_64.AppImage; path/to/love-11.4-x86_64.AppImage .`
-- * on Mac: `path/to/love.app/Contents/MacOS/love .`
local circle = love.graphics.circle
local color = love.graphics.setColor
local rect = love.graphics.rectangle
@akkartik
akkartik / love-gravity.lua
Created June 1, 2022 03:11
Gravity simulation. Pull on an object with a slingshot and see where it goes.
-- gravity simulation
--
-- To run:
-- Download LÖVE from https://love2d.org
-- Download this file to a directory and rename it to `main.lua`
-- Run the program from that directory.
-- * on Linux (using the appimage binary): `chmod +x path/to/love-11.4-x86_64.AppImage; path/to/love-11.4-x86_64.AppImage .`
-- * on Mac: `path/to/love.app/Contents/MacOS/love .`
--
-- You'll see an orange sun and a blue-green satellite. Try clicking on the
@akkartik
akkartik / love-paint.lua
Last active June 11, 2022 21:18
Little drawing program
-- To run:
-- Download LÖVE from https://love2d.org
-- Download this file to a directory and rename it to `main.lua`
-- Run the program from that directory.
-- * on Linux (using the appimage binary): `chmod +x path/to/love-11.4-x86_64.AppImage; path/to/love-11.4-x86_64.AppImage .`
-- * on Mac: `path/to/love.app/Contents/MacOS/love .`
--
-- Based on https://love2d.org/forums/viewtopic.php?t=87469
function love.load()
@akkartik
akkartik / love-stack-puzzle.lua
Last active May 9, 2022 23:45
Stack blocks with different effects to transform one sequence of shapes into another
-- To run:
-- Download LÖVE from https://love2d.org
-- Download this file to a directory and rename it to `main.lua`
-- Run the program from that directory.
-- * on Linux (using the appimage binary): `chmod +x path/to/love-11.4-x86_64.AppImage; path/to/love-11.4-x86_64.AppImage .`
-- * on Mac: `path/to/love.app/Contents/MacOS/love .`
--
-- Click on rounded rectangles to see what they do.
-- Use ctrl-n and ctrl-p to jump between puzzles.
@akkartik
akkartik / love-geometry.lua
Last active April 24, 2024 05:05
Little UI for compass-and-straightedge constructions using https://love2d.org
-- To run:
-- Download LÖVE from https://love2d.org
-- Download this file to a directory and rename it to `main.lua`
-- Run the program from that directory.
-- * on Linux (using the appimage binary): `chmod +x path/to/love-11.4-x86_64.AppImage; path/to/love-11.4-x86_64.AppImage .`
-- * on Mac: `path/to/love.app/Contents/MacOS/love .`
-- maximize window
love.window.setMode(0, 0)
width, height, flags = love.window.getMode()
@akkartik
akkartik / review-jam.md
Last active October 24, 2021 07:16
Brainstorming Mu task list for FoC Review Jam

Review Jam

Vocabulary goals:

  • shell
  • sandbox
  • instruction, operation, inouts, outputs
  • strings, arrays, streams
  • addresses, handles
  • ...