Skip to content

Instantly share code, notes, and snippets.

@MelbourneDeveloper
MelbourneDeveloper / aResults.md
Last active August 9, 2023 16:29
Flutter/Dart Benchmarks: ChangeNotifier/Cubit/StateNotifier/StreamController
Test Time (Microseconds)
ValueNotifier 0.14619362615225495
StateNotifier 0.6242255
Cubit 1.2855485
StreamController 1.3412715

macOS Mac Mini - 3.2 GHz 6-Core Intel Core i7, running under Flutter Release Mode

@santaklouse
santaklouse / CrossOver.sh
Last active June 26, 2024 15:00
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@nattybear
nattybear / foldM.md
Last active November 16, 2020 10:13
Learn You a Haskell for Great Good 14장 foldM

이 글은 책 Learn You a Haskell for Great Good을 읽고 정리한 것입니다.

foldM

함수 foldl의 모나드 버전은 foldM이다. foldl의 타입은 아래와 같다.

foldl :: (a -> b -> a) -> a -> [b] -> a
@qdm12
qdm12 / README.md
Last active June 28, 2024 13:53
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukaselmer
lukaselmer / ExportOptions.plist
Created January 11, 2020 21:10
Create a Flutter .apk and .ipa file to upload it to Firebase App Distribution
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
<key>uploadBitcode</key>
<false/>
<key>uploadSymbols</key>
<true/>
@denniske
denniske / custom-solution.dart
Last active May 30, 2021 09:48
Flutter Modal bottom sheet will not overlap keyboard (Fixed)
import 'package:flutter/material.dart';
class CustomPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(),
floatingActionButton: FloatingActionButton(
onPressed: () {
showModalBottomSheet(
@theprojectsomething
theprojectsomething / index.js
Last active November 7, 2019 09:34
Firebase Cloud Functions: Multi-file setup
const functions = require('firebase-functions');
const path = require('path');
const glob = require('glob');
const ENDPOINT_FOLDER = './endpoints';
const DO_NOT_DEPLOY = /^(admin|a|debug|d)$/;
const IGNORE = /^(ignore|i)$/;
const BREAK_ON_ERROR = true;
const is = {
diff --git a/gstreamer-send/main.go b/gstreamer-send/main.go
index 3a2ab8c..df5df2a 100644
--- a/gstreamer-send/main.go
+++ b/gstreamer-send/main.go
@@ -27,8 +27,16 @@ func main() {
},
}
+ m := webrtc.MediaEngine{}
+ s := webrtc.SettingEngine{}