This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Chromoting Server for X11 | |
Requires=display-manager.service | |
Wants=network-online.target user@%i.service | |
After=display-manager.service network-online.target | |
[Service] | |
User=%I | |
Group=chrome-remote-desktop | |
PermissionsStartOnly=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
declare -r IFACE=${IFACE:-wg0} | |
declare -r CONFIG_FILE=${CONFIG_FILE:-/etc/systemd/network/90-${IFACE}.netdev} | |
declare -r BASE_TIME=${BASE_TIME:-$(date -d '5 minutes ago' +%s)} | |
declare -A PEERS=() | |
declare PEER_SECTION= PUBLIC_KEY= ENDPOINT= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Outline | |
import android.graphics.Path | |
import android.graphics.Rect | |
import android.graphics.Region | |
import android.graphics.drawable.Drawable | |
import android.graphics.drawable.LevelListDrawable | |
import android.os.Build | |
import android.util.AttributeSet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <string.h> | |
static void swap(int *a, int *b) { | |
if (a != b) { | |
int c = *a; | |
*a = *b; | |
*b = c; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack script --resolver lts --package "ioctl monad-loops process unix" | |
{-# LANGUAGE CPP, MultiParamTypeClasses, NondecreasingIndentation #-} | |
module Main where | |
import Control.Concurrent (forkFinally, killThread) | |
import Control.Concurrent.MVar (newEmptyMVar, takeMVar, tryPutMVar) | |
import Control.Exception (bracket, catchJust, finally) | |
import Control.Monad (void, when) | |
import Control.Monad.Fix (fix) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
-- stack script --resolver lts --package unix | |
module Main where | |
import Control.Concurrent | |
import Control.Concurrent.MVar | |
import System.Posix | |
main :: IO () | |
main = do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see org.robolectric.plugins.DefaultSdkProvider | |
enum class Sdk(val apiLevel: Int, val androidVersion: String, val robolectricVersion: String) { | |
JELLY_BEAN(16, "4.1.2_r1", "r1"), | |
JELLY_BEAN_MR1(17, "4.2.2_r1.2", "r1"), | |
JELLY_BEAN_MR2(18, "4.3_r2", "r1"), | |
KITKAT(19, "4.4_r1", "r2"), | |
LOLLIPOP(21, "5.0.2_r3", "r0"), | |
LOLLIPOP_MR1(22, "5.1.1_r9", "r2"), | |
M(23, "6.0.1_r3", "r1"), | |
N(24, "7.0.0_r1", "r1"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main() { | |
int pipefd[2]; | |
close(0); | |
close(1); | |
pipe(pipefd); | |
write(1, "echo $Q\n", 8); | |
execle("/bin/sh", "sh", NULL, (char *[]) {"Q=echo $Q", NULL}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: Daniel Lin <[email protected]> | |
Date: Thu, 11 Feb 2021 15:54:17 -0500 | |
Subject: [PATCH] resolve: configure systemd-resolved's MulticastDNS= setting | |
When using iwd.conf:[General].EnableNetworkConfiguration=true, it is not | |
possible to configure systemd.network:[Network].MulticastDNS= as | |
systemd-networkd considers the link to be unmanaged. This patch allows | |
iwd to configure that setting on systemd-resolved directly. | |
--- | |
src/iwd.config.rst | 9 ++++++ |