Skip to content

Instantly share code, notes, and snippets.

View SethDusek's full-sized avatar
🏠
Working from home

Kamal Ahmad SethDusek

🏠
Working from home
View GitHub Profile
#![feature(await_macro)]
#![feature(futures_api)]
#![feature(async_await)]
use std::time::{Instant, Duration};
use std::future::Future;
use std::task::{Waker, Context, Poll};
use std::pin::Pin;
static VTABLE: std::task::RawWakerVTable = std::task::RawWakerVTable {
wake: wake as unsafe fn(*const ()),
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) M-5Y51 CPU @ 1.10GHz
CPU Family: 0x6
[2019-01-20 15:58:12] Log session started
[2019-01-20 15:58:12] [0,0] SetSteamID( [U:1:0] )
[2019-01-20 15:58:17] [0,0] LogOff()
[2019-01-20 15:58:21] [0,0] SetSteamID( [U:1:0] )
[2019-01-20 15:58:21] [0,0] SetSteamID( [U:1:0] )
[2019-01-20 15:58:21] [0,0] Server says 0% of connections should be websockets, we rolled 22 - using UDP as default.
[2019-01-20 15:58:21] CCMInterface::YieldingConnect -- no CMs cached locally, calling ISteamDirectory/GetCMList web api. . .
[2019-01-20 15:58:23] CCMInterface::YieldingConnect -- got 100 CMs and 100 WebSocket CMS from ISteamDirectory/GetCMList.
#include <libavutil/pixdesc.h>
#include <libavcodec/avcodec.h>
#include <libavutil/hwcontext_drm.h>
#include <libavutil/hwcontext.h>
#include <libavutil/buffer.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
struct primecorder {
#include <libavutil/pixdesc.h>
#include <libavcodec/avcodec.h>
#include <libavutil/hwcontext_drm.h>
#include <libavutil/hwcontext.h>
#include <libavutil/buffer.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
static int device_open(AVBufferRef *ctx, const char *filename) {
@SethDusek
SethDusek / add.rs
Last active December 31, 2017 22:15
use CPU;
use instruction::*;
#[derive(InstructionInfo)]
#[opcode = 0x02]
pub struct Add;
impl Instruction for Add {
fn run(cpu: &mut CPU, instr: Instr) -> Option<u16> {
let a: u16;
#![feature(iterator_step_by)]
extern crate sdl2;
use std::ops::Add;
use sdl2::pixels::Color;
use sdl2::render::Canvas;
use sdl2::event::Event;
const MAX_ITER: u64 = 12;
#[derive(Copy, Clone, Debug)]
pub struct Complex(f64, f64);
#![feature(iterator_step_by)]
extern crate sdl2;
use std::ops::Add;
use sdl2::pixels::Color;
use sdl2::render::Canvas;
use sdl2::event::Event;
const MAX_ITER: u64 = 12;
#[derive(Copy, Clone, Debug)]
pub struct Complex(f64, f64);
use std::os::unix::io::AsRawFd;
use std::ptr::null_mut;
use std::io::prelude::*;
use std::io::Error;
mod raw {
pub use libc::{c_int, splice};
const __NR_COPY_FILE_RANGE: ::libc::c_long = 326;
#[inline]
pub unsafe fn copy_file_range(fd_in: c_int, off_in: *mut ::libc::loff_t, fd_out: c_int, off_out: *mut ::libc::loff_t, len: usize, flags: u32) -> i64 {
::libc::syscall(__NR_COPY_FILE_RANGE, fd_in, off_in, fd_out, off_out, len, flags)
use std::io;
use std::os::unix::io::AsRawFd;
pub struct Stdin(io::Stdin);
pub struct Stdout(io::Stdout);
pub struct Stderr(io::Stderr);
impl AsRawFd for Stdin {
fn as_raw_fd(&self) -> i32 { 0 }
}