Skip to content

Instantly share code, notes, and snippets.

View marinsagovac's full-sized avatar

Marin Sagovac marinsagovac

View GitHub Profile
@marinsagovac
marinsagovac / event.php
Created February 14, 2018 14:17
PHP TCP Server example
<?php
$serv=stream_socket_server("tcp://0.0.0.0:8000",$errno,$errstr) or die("create server failed");
$base = event_base_new();
$event = event_new();
function read_cb($socket, $flag, $base) {
fread($socket);
fwrite("hello world\n");
}
@marinsagovac
marinsagovac / map.geojson
Created February 19, 2018 12:49 — forked from walesmd/map.geojson
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marinsagovac
marinsagovac / gist:df99321f23f255ef524973b5cc82388c
Created November 11, 2023 13:03 — forked from menht/gist:2698877
Install and Uninstall Android applications with PackageInstaller

In android source code can get

<activity android:name=".PackageInstallerActivity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="content" />
        <data android:scheme="file" />