This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require("L5") | |
| local lines = {} | |
| local lineCount = 10 | |
| local velocity = 3 | |
| function setup() | |
| windowTitle('Walking Lines') | |
| size(680, 680) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Mastodon: Keep Local Feed Quieter | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Stop publicly replying to your own posts on Mastodon. | |
| // @author Orllewin | |
| // @match https://merveilles.town/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=merveilles.town | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| print('DartWhen'); | |
| var x = 1; | |
| when(x, { | |
| 1: () => print("is 1"), | |
| 2: () => print("is 2"), | |
| 3: () { | |
| print("is 3"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Exploring basic Kotlin style _when_ syntax in Dart | |
| void main() { | |
| int code = 100; | |
| var x = when(code,{ | |
| 100: 1, | |
| 200: () => print("Success"), | |
| 400: () => print("Client Error"), | |
| 500: () => print("Server Error"), | |
| (code > 400 && code < 500): () => print("Undefined client error: $code") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import kotlinx.browser.document | |
| import kotlinx.browser.window | |
| import org.w3c.dom.CanvasRenderingContext2D | |
| import org.w3c.dom.HTMLCanvasElement | |
| import kotlin.random.Random | |
| lateinit var context: CanvasRenderingContext2D | |
| lateinit var canvas: HTMLCanvasElement | |
| fun main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo -e "\n\tIMGWIDEN\n\tAnamorphic photo utility\n" | |
| # Check ImageMagick Identify is available | |
| if ! command -v identify &> /dev/null | |
| then | |
| echo -e "'identify' could not be found, make sure you have ImageMagick fully installed\n" | |
| exit | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package orllewin.osname | |
| import android.content.Context | |
| import android.content.pm.PackageManager | |
| /** | |
| * Don't forget to add the packages to the manifest.xml: | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" ... > | |
| <queries> | |
| <package android:name="app.grapheneos.camera" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package orllewin.lutcreator | |
| import android.graphics.Bitmap | |
| import com.google.android.renderscript.LookupTable | |
| import com.google.android.renderscript.Toolkit | |
| /** | |
| * | |
| * Fast Bitmap colour channel filtering |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Calculates 256 values from a curve to drive a Toolkit LookupTable which uses a byte array with length 256 | |
| * eg. for a red channel the zeroth index in the array has value 0 (black), index 255 has value 255 (pure red) | |
| * but... the values returned here are just the ui input mapped to 0 to 255 | |
| * @param curveId - the name of the curve, "RED", "GREEN", "BLUE", "LUMI" | |
| * @return FloatArray with values mapped from the ui in range 0 to 255 | |
| */ | |
| fun getData(curveId: String): FloatArray{ | |
| //The view can have n curves, find the one with the id we want |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package orllewin.haldclut_impl | |
| import android.content.Context | |
| import android.graphics.Bitmap | |
| import android.graphics.BitmapFactory | |
| import android.graphics.Color | |
| import com.google.android.renderscript.Rgba3dArray | |
| import com.google.android.renderscript.Toolkit | |
| /** |