Skip to content

Instantly share code, notes, and snippets.

View KyLeggiero's full-sized avatar
💜
Any Pronouns

Ky KyLeggiero

💜
Any Pronouns
View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active June 20, 2024 03:04
set -e, -u, -o, -x pipefail explanation
@KyLeggiero
KyLeggiero / Swift Enum-Based Datetime Formatter.swift
Last active August 8, 2018 18:55
Create a datetime format with clear and concise Swift enums instead of a cryptic string
// Copyright Ben Leggiero 2017 BH-1-PS
// https://github.com/BlueHuskyStudios/Licenses/blob/master/Licenses/BH-1-PS.txt
import Foundation
@cieslak
cieslak / ‽.swift
Created June 13, 2014 19:32
Interrobang operator in Swift
import Foundation
operator postfix ‽ {}
@postfix func ‽<T>(value: T?) -> T? {
return (arc4random_uniform(2) == 1) ? value : nil
}
@jewelsea
jewelsea / ImageScaler.java
Created April 18, 2013 20:17
Demonstrates different methods of scaling images in JavaFX and the effects of scaling with each.
import javafx.application.*;
import javafx.geometry.HPos;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.image.*;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class ImageScaler extends Application {
@jewelsea
jewelsea / OffScreenOffThreadCharts.java
Created March 2, 2013 19:24
Render 300 charts off screen and save them to files in JavaFX.
import java.awt.image.BufferedImage;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.*;
import java.util.logging.*;
import javafx.application.*;
import javafx.beans.binding.*;
import javafx.beans.property.*;
import javafx.beans.value.*;
@abernier
abernier / Readme.md
Last active April 24, 2024 08:33
Link anatomy