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
| // Main() | |
| { | |
| var socketHandler = new SocketsHttpHandler { | |
| PlaintextStreamFilter = (filterContext, ct) => new ValueTask<Stream>(new HttpFixerDelegatingStream(filterContext.PlaintextStream)) | |
| }; | |
| var httpClient = new HttpClient(socketHandler); | |
| var httpGetter = await httpClient.GetAsync("http://icyserver:8000/my_awesome_stream.mp3", HttpCompletionOption.ResponseHeadersRead); | |
| } |
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
| # syntax=docker/dockerfile:1 | |
| FROM bitnami/php-fpm | |
| RUN apt-get update && apt-get install -y \ | |
| autoconf \ | |
| build-essential \ | |
| wget | |
| RUN cd /root \ | |
| && wget https://pecl.php.net/get/redis-5.3.7.tgz \ | |
| && tar xzf redis-5.3.7.tgz && cd redis-5.3.7 \ | |
| && phpize \ |
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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| var parsableOutput = "0x3000F"; |
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
| require('dotenv').config() | |
| let oldCl = console.log; | |
| console.log = function(msg) { | |
| oldCl('[' + new Date().toISOString() + '] ' + msg); | |
| } | |
| const http = require('http'); | |
| const i2b64 = require('image-to-base64'); |
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
| public class Manager | |
| { | |
| private readonly AutoResetEvent _reset = new AutoResetEvent(false); | |
| private Thread _mainThread; | |
| public bool IsRunning => _mainThread != null && _mainThread.IsAlive; | |
| public Manager() | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Net.Security; | |
| using System.Net.Sockets; | |
| namespace FoxCouncil.Gist | |
| { |
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
| private static T GetNext<T>(IEnumerable<T> list, T current) | |
| { | |
| try | |
| { | |
| if (list.Last().Equals(current)) | |
| { | |
| return list.First(); | |
| } | |
| return list.SkipWhile(x => !x.Equals(current)).Skip(1).First(); |
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
| namespace FoxCouncil.Gist | |
| { | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Security.Cryptography; |
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
| // Copyright (c) Fox Council - License: MIT | |
| /* | |
| * Usage Example: | |
| * [HttpGet] | |
| * public async Task<IActionResult> All() | |
| * { | |
| * return await this.Cached(TimeSpan.FromMinutes(15), async () => { | |
| * await _stuff.SomeLongTask(); | |
| * return await _stuff.GetStuff(); |