This file contains 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
name: Publish to Itch.io | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: |
This file contains 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 timeit | |
def isHappyStr(n: int) -> bool: | |
seen = set() | |
current = str(n) | |
while current not in seen: | |
seen.add(current) | |
sum = 0 |
This file contains 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
using UnityEngine; | |
[RequireComponent( typeof(Camera) )] | |
public class FlyCamera : MonoBehaviour { | |
public float acceleration = 50; // how fast you accelerate | |
public float accSprintMultiplier = 4; // how much faster you go when "sprinting" | |
public float lookSensitivity = 1; // mouse look sensitivity | |
public float dampingCoefficient = 5; // how quickly you break to a halt after you stop your input | |
public bool focusOnEnable = true; // whether or not to focus and lock cursor immediately on enable |
This file contains 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
@tool | |
extends Node3D | |
# ------------------------------------------------------------------------------ | |
# Script that turns a folder with meshes into MeshInstances in a scene. | |
# You can then export the scene into a MeshLibrary or further customize the | |
# meshes. You may want to add colliders :) | |
# Good for testing / prototyping / quick layout purposes. | |
# Written and tested in Godot 4 alpha 12 | |
# ------------------------------------------------------------------------------ |
This file contains 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
// A clearly visible "wireframe" rectangle used for quickly sketching out layouts. | |
// Color of the rectangle is computed from its description. If you don't give it | |
// any, it will default to light gray color. | |
// Shows borders, diagonal, description text and its size, all colored. | |
import QtQuick | |
import QtQuick.Shapes 1.3 | |
Rectangle { | |
id: root |
This file contains 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/sh | |
# This scipt was created to simplify connecting to my Rasberry Pi 4 | |
# via ssh. Be sure to set the MAC addresses and username accordingly! | |
DEVICES=$(arp -an) | |
parse_ip() { | |
RPI_ADDRESS=$(echo $DEVICES | grep $1 | \ | |
awk -F '(' '{print $2}' | awk -F ')' '{print $1}') |
This file contains 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
enum FilterType : String { | |
case Mono = "CIPhotoEffectMono" | |
case MonoChrome = "CIColorMonochrome" | |
case Noir = "CIPhotoEffectNoir" | |
case Tonal = "CIPhotoEffectTonal" | |
case Sharpen = "CIUnsharpMask" | |
case Blur = "CIGaussianBlur" | |
case Pixelate = "CIPixellate" | |
case Edges = "CIEdges" | |
case Negative = "CIColorInvert" |
This file contains 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
func addFilter(filterType : FilterType) -> UIImage { | |
let filter = CIFilter(name: filterType.rawValue) | |
// convert UIImage to CIImage and set as input | |
let ciInput = CIImage(image: self) | |
filter?.setValue(ciInput, forKey: "inputImage") | |
if filterType == .Sharpen { | |
filter?.setValue(0.8, forKey: "inputIntensity") | |
filter?.setValue(8, forKey: "inputRadius") | |
} |