https://keyoxide.org/116FBA8295065A01C3BC7CC6CF79BF54D4BF0A41
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
let sb = FlurrySessionBuilder() | |
.build(logLevel: FlurryLogLevel.all) | |
.build(crashReportingEnabled: true) | |
.build(appVersion: Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String) | |
.build(iapReportingEnabled: true) | |
Flurry.startSession(apiKey: EnvConfig.flurryApiKey, sessionBuilder: sb) |
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
<script setup lang="ts"> | |
import { useRoute } from 'vue-router' | |
import { watch, ref } from 'vue' | |
const route = useRoute() | |
const submenu1 = ref<HTMLElement | null>(null) | |
const closeMenu = (element: HTMLElement | null) => { | |
if (element && element.hasAttribute('open')) { |
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/bash | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
function shutdown() { | |
colima stop | |
exit 0 | |
} | |
trap shutdown SIGTERM |
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
<html> | |
<head> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" | |
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" | |
crossorigin="anonymous" | |
/> | |
<script | |
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" |
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
@RestController | |
class Controller(val service: SomeService) { | |
@GetMapping("/something") | |
fun all() = service.all() | |
@PostMapping("/something") | |
suspend fun save(@RequestBody something: CreateDTO) = service.create(something) | |
@PutMapping("/something/{id}") | |
suspend fun update(@PathVariable id: Long, @RequestBody updates: UpdateDTO) = service.update(id, updates) |
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
public class Convert { | |
public static void main(String[] args) { | |
String pngFile = args[0]; | |
String datFile = args[1]; | |
try { | |
BufferedImage image = ImageIO.read(new File(pngFile)); | |
try ( | |
LittleEndianDataOutputStream outputStream = new LittleEndianDataOutputStream(new FileOutputStream(datFile)) |
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
/** | |
* Could't get adafruit's image reader working on Teensy 4.1 - doesn't seem to be compatible with | |
* Teensy's version of the SD card library | |
* | |
* But - the TFT object has this method: | |
* | |
* void Adafruit_GFX::drawRGBBitmap( | |
* int16_t x, | |
* int16_t y, | |
* uint16_t * bitmap, |
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/zsh | |
# Assumes you start with three directories of images in png format with the same name - 1x, 2x and 3x | |
# Call with four params | |
# zip_directories_to_xcassets.zsh name_of_asset_file directory_of_1x_pngs directory_of_2x_pngs directory_of_3x_pngs | |
ASSETS_DIR=$1.xcassets | |
D1=$2 | |
D2=$3 | |
D3=$4 |
NewerOlder