This file contains 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
use bevy::asset::{io::*, *}; | |
use serde::*; | |
use tracing::*; | |
/// A serializable reference to an asset based on its path. It can only work for | |
/// assets that have paths. | |
/// | |
/// A common use case is to refer to an asset in settings for an [AssetLoader], | |
/// which must be serializable. | |
/// |
This file contains 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 threading import Thread, Lock | |
from Queue import Queue | |
import itertools, traceback, multiprocessing | |
class FixedThreadPoolExecutor(object): | |
""" | |
Executes tasks in a fixed thread pool. | |
Makes sure to gather all returned results and thrown exceptions in one place, in order of task | |
submission. |
This file contains 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 | |
if (( $# != 2 )); then | |
echo 'Control whether an executable has the privilege to bind to ports < 1024, even if the user is not root' | |
echo | |
echo "Usage: $(basename "$0") [enable|disable|status] [path-to-exectuable]" | |
exit 1 | |
fi | |
FILE=$(readlink -f "$2") |
This file contains 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 python | |
''' | |
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library. | |
Features: | |
* Map URI patterns using regular expressions | |
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST) | |
* All responses and payloads are converted to/from JSON for you |