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 crate::components; | |
use amethyst::ecs::{self, prelude::*, shred::ResourceId}; | |
pub trait EventSystem<'a> { | |
type SystemData: ecs::SystemData<'a>; | |
type Event: Sized; | |
fn run(data: &Self::SystemData, event: &mut Self::Event) -> bool; |
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
//! This is a direct port of these algorithms' respective | |
//! C implementations into Rust. I did this chiefly as a learning | |
//! exercise for myself, but after adopting the `wrapping_mul` and | |
//! `rotate_left` methods (which I discovered from looking at the | |
//! code in the `rand` crate) I ended up with essentially identical | |
//! implementations to what's in the popular `rand` crate. Also here | |
//! is a very quick-and-dirty main() that demonstrates some of the | |
//! functionality. | |
//! | |
//! See https://payloadgame.dev/devlog/2019/02/28/random-generators.html |
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 | |
import requests | |
import conf | |
url_base = 'https://api.cloudflare.com/client/v4{endpoint}' |
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 | |
# disk_wipe.sh | |
# Author: Kromey (http://kromey.us/) | |
# This simple Bash script leverages the dd utility to provide user feedback | |
# as progress is made, designed for the purpose of wiping hard drives or | |
# partitions. This script reads from /dev/zero to most efficiently zero-out | |
# the target device or partition. | |
# | |
# BEGIN CONFIG |
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 | |
########################################################################################## | |
# Automated Let's Encrypt certificate renewals # | |
# # | |
# This script is designed to be run as often as desired, but will not renew certificates # | |
# until they are due to expire (by default 30 days ahead of expiry). # | |
# # | |
# This script expects that you've provided appropriate parameters in a cli.ini file, # | |
# either in /etc/letsencrypt/cli.ini or $XDG_CONFIG_HOME/letsencrypt/cli.ini; note that # |
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
#Put in your home directory | |
[distutils] | |
index-servers=pypi | |
[pypi] | |
repository = https://pypi.python.org/pypi | |
username = <username> | |
password = <password> |
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 | |
##### | |
# db_backup.sh | |
# This script is intended to run nightly and makes SQL dumps of each of your | |
# MySQL and PostgreSQL databases. | |
# | |
# Prerequisites: | |
# * You must have a database user in each server with proper privileges: | |
# * MySQL: SELECT, RELOAD, LOCK TABLES, and EVENTS on each database |