Skip to content

Instantly share code, notes, and snippets.

View benoitjadinon's full-sized avatar

Benoit Jadinon benoitjadinon

View GitHub Profile

Steps to get Capacitor working with SvelteKit

  1. Set up a SvelteKit project as usual.
npm create svelte@latest my-app
cd my-app
npm install
npm run dev -- --open
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

RxCommandListener<ImageStorageRequest, ImageLocation> selectImageListener;
RxCommandListener<ChatEntry, void> deleteChatEntryListener;
@override
void initState() {
super.initState();
selectImageListener = RxCommandListener(
command: sl.get<ImageManager>().selectAndUploadImageCommand,
onValue: (imageLocation) async {
@joseluisq
joseluisq / stash_dropped.md
Last active March 28, 2024 11:59
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@veryhumble
veryhumble / RecyclerViewAdapter.cs
Last active August 5, 2021 19:13
Xamarin.Forms RecyclerView Renderer for Android
using System.Collections;
using System.Diagnostics;
using A11YGuide.Controls;
using A11YGuide.Droid.Helpers;
using A11YGuide.ViewModels.Search;
using Android.Support.V7.Widget;
using Android.Views;
using Android.Widget;
using fivenine.Core.Extensions;
using Xamarin.Forms;
@Misterhex
Misterhex / ObservableExtensions.cs
Last active February 17, 2019 19:13
Rx extensions from reactive trader
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Threading;
@bkase
bkase / prnsaaspfruicc.md
Created March 3, 2016 22:58
Production-Ready(?) Native Single-Atom-State Purely Functional Reactive Composable UI Components, or PRNSAASPFRUICC

Production-Ready(?) Native Single-Atom-State Purely Functional Reactive Composable UI Components, or PRNSAASPFRUICC

The native UI toolkits on Android and iOS are frustratingly imperative. Unfortunately, there has been little architecture evolution (unlike the web). However, nothing(ish) is stopping us from bolting something "nice" on top. By nice I mean single-atom-state purely functional reactive composable UI components. In this post, I'll explain what this title means, the inspiration behind the design of the framework, an example component, and dive a little into the framework's implementation.

Right now, there only exists a Kotlin (Android) implementation, but a Swift port will be relatively straightforward and will happen soon.

Let's break down the title:

  • "Production-Ready"
@dannycabrera
dannycabrera / AppDelegate.cs
Created December 30, 2015 22:20
Xamarin.iOS Blur screen with OnResignActivation
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
UIVisualEffectView _blurView = null;
public override void OnActivated (UIApplication application)
{
try {
if (_blurView != null) {
_blurView.RemoveFromSuperview ();
@cjgaliana
cjgaliana / SecureStorage.cs
Created September 29, 2015 09:57
Secure Storage for Xamarin.iOS
using System;
using System.Threading.Tasks;
using Security;
using Foundation;
using System.Collections.Generic;
namespace SecureStorageTest
{
public class SecureStorage
{