Skip to content

Instantly share code, notes, and snippets.

@marcoarment
marcoarment / Searchable_iOS16.swift
Created July 11, 2023 19:23
Backporting iOS 17's SwiftUI .searchable($isPresented) binding for iOS 16
import SwiftUI
extension View {
public func searchable_iOS16(text: Binding<String>, isPresented: Binding<Bool>, placement: SearchFieldPlacement) -> some View {
modifier(Searchable_iOS16(text: text, isPresented: isPresented, placement: placement))
}
}
public struct Searchable_iOS16: ViewModifier {
@Binding var text: String
@kbumsik
kbumsik / Dropbox-for-FreeNAS-SCALE.md
Last active December 20, 2024 14:28
Native Dropbox client for FreeNAS SCALE

Native Dropbox client service for TrueNAS SCALE

Although FreeNAS (TrueNAS) does support Dropbox backup, it is not the official Dropbox client that offers native and almost-real-time syncing.

Their new project, TrueNAS SCALE, is the Linux version of FreeNAS. Since it is Linux Debian OS rather than FreeBSD, you now can run any Linux programs like the official Dropbox client.

This guide is intended to learn how to run the official headless Dropbox daemon on bootup.

Install Dropbox daemon

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
---
title: "tikz in Quarto!"
format: html
---
```{r include=FALSE}
# Necessary for using dvisvgm on macOS
# See https://www.andrewheiss.com/blog/2021/08/27/tikz-knitr-html-svg-fun/
Sys.setenv(LIBGS = "/usr/local/share/ghostscript/9.53.3/lib/libgs.dylib.9.53")
@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active December 20, 2024 14:26
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
@EvanBacon
EvanBacon / apple-touch-startup-image.html
Created April 17, 2019 07:10
An example of full iOS PWA startup image (splash screen) support.
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Expo" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link
rel="apple-touch-icon"
sizes="180x180"
@igormukhingmailcom
igormukhingmailcom / STUPID_SYLIUS_ISSUES.md
Last active December 20, 2024 14:25
Symfony/Sylius stupid issues that hard to debug and which may waste too many hours

Symfony/Sylius stupid issues that hard to debug and which may waste too many hours

1. [Doctrine\Common\Persistence\Mapping\MappingException] Class 'Your\SyliusPlugin\Entity\YourEntity' does not exist

When your plugin is AbstractResourceBundle and all your entities should be and actually placed at Model directory, you have that exception (notice ...\Entity\... at exception rather than ..\Model\...) for your Your\SyliusPlugin\Model\YourEntity.php that is weird.

This happens when you accidentally have your mapping file at src/Resources/config/doctrine/YourEntity.orm.xml (without ../model/.. part) rather than src/Resources/config/doctrine/model/YourEntity.orm.xml.

This issue may happen when you convert some of your application code (which use Entity directory) to plugin (which use Model directory).

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="Content-Security-Policy"
content="default-src: http: https: 'self'"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
@shogo82148
shogo82148 / event.json
Created August 4, 2021 14:27
The event.json for creating pull request
{
"action": "opened",
"number": 15,
"pull_request": {
"_links": {
"comments": {
"href": "https://api.github.com/repos/shogo82148/github-action-test/issues/15/comments"
},
"commits": {
"href": "https://api.github.com/repos/shogo82148/github-action-test/pulls/15/commits"
@skylandersNFC
skylandersNFC / keys.txt
Last active December 20, 2024 14:18
Skylanders Cemu Decryption Keys (Place the keys.txt file inside your main Cemu directory)
# this file contains keys needed for decryption of file system data (WUD/WUX)
# 1 key per line, any text after a '#' character is considered a comment
# the emulator will automatically pick the right key
2d55fb6f445d484ea74e8f73b7d9f22e # Skylanders: Spyro's Adventure [JPN]
bd113111af8ea29d298694db0e79609f # Skylanders: Spyro no Daibouken [JPN, WUD]
8c1a8bd824663845db926cd3b7f5c250 # Skylanders: Giants [PAL]
150452314d8c238409ac51cf3155516a # Skylanders: Giants [EUR, WUD]
c69c2c6791441916de9d2a0e002226c7 # Skylanders: Giants [USA, WUD]