Skip to content

Instantly share code, notes, and snippets.

View coolya's full-sized avatar

Kolja Dummann coolya

View GitHub Profile
@coolya
coolya / build.gradle.kts
Last active September 26, 2022 11:08
Minimal MPS Build
import de.itemis.mps.gradle.downloadJBR.DownloadJbrForPlatform
import de.itemis.mps.gradle.BuildLanguages
buildscript {
repositories {
maven { url = uri("https://projects.itemis.de/nexus/content/repositories/mbeddr") }
mavenCentral()
}
dependencies {
@coolya
coolya / nginx.conf
Created August 31, 2022 15:36
Minimum nginx reverse proxy configuration to access MPS/IntelliJ webserver outside of localhost. Do not use this config with untrusted clients connecting to the IDE.
events {
worker_connections 1024;
}
http {
server {
listen 63399;
location / {
proxy_set_header Referer "";
proxy_set_header Origin "";
@coolya
coolya / check notification permission
Last active September 10, 2020 02:43
How to check if you app has permission to get notification service listener
boolean hasNotificationAccess()
{
ContentResolver contentResolver = this.getContentResolver();
String enabledNotificationListeners = Settings.Secure.getString(contentResolver, "enabled_notification_listeners");
String packageName = this.getPackageName();
// check to see if the enabledNotificationListeners String contains our package name
return !(enabledNotificationListeners == null || !enabledNotificationListeners.contains(packageName));
}

Neue Funktionen in OBS 25

  • Vulkan Spiele Aufnahme

  • Neue Fensteraufnahmemodus für Browser- und Windows Store Fenster.

    • Standardmäßig wird "Automatisch" verwendet, was auf den meisten Fenstern die normale Methode und auf Browsern, browserbasierten Fenstern und Microsoft Store (UWP)-Programmen die neue Methode verwendet.
    • Der Nachteil der neuen Methode ist, dass sie eine leichte Verzögerung des Cursors sowie einen hervorgehobenen Rand um das aufgenommene Fenster verursachen kann. Der Rand selbst wird jedoch nicht
  • Erweiterter Import von Szenensammlungen (in der Menüleiste, Szenensammlung -> Importieren), mit dem Sie aus anderen gängigen Streaming-Programmen importieren können [Dillon].

  • Hotkeys für die Medienquelle hinzugefügt, um die Steuerung der Wiedergabe (Stopp/Pause/Wiedergabe/Neustart) zu ermöglichen [cg2121]

@coolya
coolya / Fable.Compat.Helper.fs
Last active February 17, 2018 21:37
A simple wrapper for Giraffe html api that mimics the Fable.React api
module Giraffe.Fable.Compat.Helper
open Giraffe.GiraffeViewEngine
let inline private domEl a b c = tag a b c
let inline private voidEl a b = voidTag a b
//todo: check value and emit attr or not
let inline private boolAttr (key: string) (value: bool) = attr key (string value)
let inline private floatAttr (key: string) (value: float) = attr key (string value)
/root/.nuget/packages/fsharp.net.sdk/1.0.5/build/FSharp.NET.Core.Sdk.targets(23,31): error MSB4022: The result "" of evaluating the value "$(FscTaskAssemblyPath)" of the "AssemblyFile" attribute in element <UsingTask> is not valid. [/builds/rubecula/frontend/frontend/birdvoices.fsproj]
@coolya
coolya / todo.md
Created February 1, 2017 20:16
install cvc4

Download and extract http://cvc4.cs.nyu.edu/builds/misc/cvc4-1.4.1-prerelease-2016-01-03.tar.gz

run:

  xcode-select --install
  brew install libantlr3c boost

In the dicretory where you extracted the archive run

 ./configure
@coolya
coolya / asserts.swift
Created April 30, 2016 20:53
assert operators
enum AssertOp {
case Equals
case NotEquals
}
enum SimpleAssertOp {
case NotNil
case Nil
}
@coolya
coolya / gist:3551118
Created August 31, 2012 10:13
EnumerableExtensions.cs
public static class EnumerableExtensions
{
public static BlockingCollection<T> CopyToBlockingCollectionAsync<T>(this IEnumerable<T> source)
{
var collection = new BlockingCollection<T>();
Task.Factory.StartNew(() =>
{
foreach (var item in source)
{
@coolya
coolya / arduino.ino
Created February 27, 2016 17:22
Arduino sketch for homedata project
#include <SparkFunBME280.h>
#include <Adafruit_HDC1000.h>
#include <avr/sleep.h>
#include <avr/power.h>
#include <avr/wdt.h>
BME280 bme;
Adafruit_HDC1000 hdc = Adafruit_HDC1000();