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 | |
echo Please make sure the server is running | |
echo the command is: | |
echo openssl s_server -WWW | |
echo and make sure the 1mb file is in the same directory | |
echo to make the 1mbrf file do: | |
echo dd if=/dev/urandom of=1mbrf bs=1024 count=1024 | |
echo | |
echo the following benchmarks each will have run 50 times | |
echo |
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
#![feature(unsize)] | |
use std::alloc::Layout; | |
use std::marker::{PhantomData, Unsize}; | |
use std::mem; | |
/// Assumes pointer-sized metadata | |
#[repr(C)] | |
struct DstPointerRepr { | |
data: *mut (), |
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
# The only setting we feel strongly about is the fail_timeout=0 | |
# directive in the "upstream" block. max_fails=0 also has the same | |
# effect as fail_timeout=0 for current versions of nginx and may be | |
# used in its place. | |
# you generally only need one nginx worker unless you're serving | |
# large amounts of static files which require blocking disk reads | |
worker_processes 1; | |
# # drop privileges, root is needed on most systems for binding to port 80 |
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
# | |
# Comic Chat fixer MITM proxy: fixes Comic Chat to (sort of) work with modern | |
# IRC servers. Tested with Microsoft Chat 2.5 on Windows XP, 8 and 10 | |
# | |
# This is a fork by ave with additional fixes and python3 support | |
# Alongside some other QoL features like color nicks being displayed in chat | |
# https://gist.github.com/aveao/f6d40f41a424b1d9a54c9aba39742b76 | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by |
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
# | |
# Comic Chat fixer MITM proxy: fixes Comic Chat to (sort of) work with modern | |
# IRC servers. Tested with Microsoft Chat 2.5 on Windows XP, 8 and 10 | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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 | |
DRIVE=/dev/xvda | |
MOUNT_OPTS=defaults,x-mount.mkdir,compress=lzo,ssd,noatime | |
# Set up partitions | |
sgdisk --clear \ | |
--new=1:0:+512MiB --typecode=1:ef00 --change-name=1:EFI \ | |
--new=2:0:0 --typecode=2:8300 --change-name=2:system \ | |
$DRIVE |
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
extern crate tcod; | |
extern crate specs; | |
use tcod::console::{Root}; | |
use specs::{System, VecStorage, Component, World, Builder, WriteStorage, DispatcherBuilder}; | |
#[derive(Debug)] | |
enum Command { | |
PutCharacter(char,i32,i32), | |
Clear, |
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
export const KEY_TAB = 9; | |
export const KEY_SHIFT = 16; | |
export const KEY_CONTROL = 17; | |
export const KEY_ALT = 18; | |
export const KEY_SPACE = 32; | |
export const KEY_LEFT = 37; | |
export const KEY_UP = 38; | |
export const KEY_RIGHT = 39; | |
export const KEY_DOWN = 40; | |
export const KEY_E = 69; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Game</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<canvas class="flow" width="320" height="180"></canvas> |
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 | |
for cmd in "$@" | |
do | |
filename="${cmd%.*}" | |
echo "Encoding $cmd" | |
ffmpeg -i "$cmd" -codec:a libmp3lame -b:a 320k -nostats -hide_banner -y -loglevel 0 "$filename.mp3" | |
done |
NewerOlder