Skip to content

Instantly share code, notes, and snippets.

View indiv0's full-sized avatar

Nikita Pekin indiv0

View GitHub Profile
@indiv0
indiv0 / minerap.md
Last active August 26, 2016 17:30
Nikitape's Minerap FAQ

[OUTDATED] Summary

MinerApocalypse is a Minecraft server which intends to present unrestricted gameplay to the player in an apocalyptic environment.

###Goal To provide a balanced, apocalyptic, experience while remaining as light-weight (plug-in-wise) and as close to vanilla Minecraft as possible.

###Server Address(es) The MinerApocalypse server address is minerap.com. The MinerApocalypse development server, where plugin and other testing happens, can be accessed at dev.minerap.com.

@indiv0
indiv0 / launchcraft.json
Created December 27, 2014 06:26
launchcraft data
{
"launchcraft_version": "2.0.0",
"minecraft_versions": [
{
"version": "1.7.2",
"mods": [
{
"name": "optifine",
"desc": "Optifine",
"version": "1.7.2_HD_U_C2",
<plaintext>x(t) = ((-6/7 sin(22/15 - 13 t) - 46/45 sin(11/10 - 10 t) - 13/7 sin(16/11 - 3 t) - 69/10 sin(17/12 - 2 t) + 529/5 sin(t + 11/7) + 4/9 sin(4 t + 38/9) + 32/7 sin(5 t + 10/7) + 4/3 sin(6 t + 13/14) + 25/4 sin(7 t + 16/11) + 9/7 sin(8 t + 10/11) + 43/10 sin(9 t + 17/12) + 3/7 sin(11 t + 22/5) + 4/9 sin(12 t + 20/9) + 81/5) theta(59 pi - t) theta(t - 55 pi) + (-251/13 sin(11/8 - 3 t) + 4100/11 sin(t + 8/5) + 31/9 sin(2 t + 9/4) + 17/12 sin(4 t + 22/5) + 115/9 sin(5 t + 22/13) + 24/11 sin(6 t + 9/2) + 201/10 sin(7 t + 17/10) + 9/4 sin(8 t + 13/5) + 112/11) theta(55 pi - t) theta(t - 51 pi) + (507/5 sin(t + 11/7) + 1/5 sin(2 t + 48/11) + 73/10 sin(3 t + 11/7) + 23/10 sin(4 t + 11/7) + 1359/7) theta(51 pi - t) theta(t - 47 pi) + (680/7 sin(t + 11/7) + 8/13 sin(2 t + 23/15) + 51/8 sin(3 t + 11/7) + 1/52 sin(4 t + 19/7) + 11/5 sin(5 t + 8/5) - 497/3) theta(47 pi - t) theta(t - 43 pi) + (-4/11 sin(1 - 7 t) - 303/8 sin(11/7 - t) + 85/6 sin(2 t + 14/9) + 9/8 sin(3 t + 19/14) + 126/25 sin(4 t + 23/15) + 13/12
#![feature(dedup_by)]
extern crate csv;
extern crate serenity;
use serenity::Client;
use serenity::client::Context;
use serenity::model::{GuildId, Message, MessageId, UserId};
use serenity::utils::builder::{SortingMode, SortingOrder};
use std::{env, thread};
@indiv0
indiv0 / Profile Rust on Linux.md
Created November 23, 2017 14:32 — forked from KodrAus/Profile Rust on Linux.md
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

This requires you have flamegraph available in your path. The rust-unmangle script is optional but nice.

from curio import run
from curio.socket import *
import os
import sys
from common import send_message, read_message, b8zs_encode
DEFAULT_HOST = '127.0.0.1'
DEFAULT_PORT = 8080
# Mnemosyne configuration file.
# This file contains settings which we deem to be too specialised to be
# accesible from the GUI. However, if you use some of these settings, feel
# free to inform the developers so that it can be re-evaluated if these
# settings need to be exposed in the GUI.
# Science server. Only change when prompted by the developers.
science_server = "mnemosyne-proj.dyndns.org:80"
@indiv0
indiv0 / index.html
Last active October 3, 2019 18:50 — forked from spiermar/index.html
d3-flame-graph
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/gh/spiermar/[email protected]/dist/d3.flameGraph.min.css"
integrity="sha256-w762vSe6WGrkVZ7gEOpnn2Y+FSmAGlX77jYj7nhuCyY="
crossorigin="anonymous"
/>
</head>
#[inline]
fn is_hex_prefixed_matches(s: &str) -> bool {
matches!(s.as_bytes(), [b'0',b'x', ..] | [b'0',b'X', ..])
}
#[inline]
fn is_hex_prefixed_unsafe(s: &str) -> bool {
let x =
unsafe { ((*s.as_ptr() as u16) << 8) | (*s.as_ptr().add((s.len() > 1) as usize)) as u16 };
(x ^ 0x3078) & (x ^ 0x3050) == 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.