Skip to content

Instantly share code, notes, and snippets.

Eric Freed ForeverZer0

Block or report user

Report or block ForeverZer0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ForeverZer0
ForeverZer0 / hex2char.sh
Created Jan 30, 2020
Convert a binary file into a string that can be stored in a C file as an embedded resource.
View hex2char.sh
#!/usr/bin/bash
hexdump -v -e '16/1 "_x%02X" "\n"' $1 | sed 's/_/\\/g; s/\\x //g; s/.*/ "&"/'
@ForeverZer0
ForeverZer0 / OpenAL.cs
Last active Jan 26, 2020
Minimal bindings for OpenAL
View OpenAL.cs
using System;
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
namespace MyNamespace
{
[SuppressUnmanagedCodeSecurity]
[SuppressMessage("ReSharper", "IdentifierTypo")]
@ForeverZer0
ForeverZer0 / libsndfile.cs
Created Jan 25, 2020
Minimal bindings for the libsndfile library.
View libsndfile.cs
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
namespace SndFile
{
[SuppressUnmanagedCodeSecurity]
@ForeverZer0
ForeverZer0 / libogg.cs
Created Jan 25, 2020
Minimal bindings of the libogg reference library.
View libogg.cs
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Security;
// Referernce Source: https://xiph.org/vorbis/doc/libvorbis/reference.html
namespace OGG
{
[SuppressUnmanagedCodeSecurity]
@ForeverZer0
ForeverZer0 / hosts
Last active Dec 16, 2019
Block Spotify Ads
View hosts
############## SPOTIFY ###################
127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 www.googleadservices.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 securepubads.g.doubleclick.net
127.0.0.1 www.omaze.com
127.0.0.1 omaze.com
View CreeperCraft Rules.md

CreeperCraft Rules/Guidelines

Rules

  • Respect the server and other players. This means no destroying others builds, stealing stuff, grieving the terrain, offensive language towards other users, etc. etc. I am not going to list every possible scenario, they are all commonsense, and will get you banned faster than anything else.
  • No X-ray texture packs, TMI mods, schematic mods, flying, or any other mod/plugin/texture that gives you an advantage or abilities. Once again, does not need explained. If you feel something you want to use is even questionable, ask staff BEFORE using it.
  • DO NOT build your base within ~500 blocks of spawn (0, 0) on any axis. This area is reserved for collaborative builds and community approved/planned features. If you choose to disobey this rule, it is highly likely you will be forced to move
  • No external programs to simulate keyboard/mouse input, or any other of the many tricks to automatically perform input while you are AFK. There might be exception made for A
@ForeverZer0
ForeverZer0 / CreeperCraft Features.md
Last active Mar 12, 2019
A description of available features on the CreeperCraft server
View CreeperCraft Features.md

CreeperCraft Features

CreeperCraft's aim is to maintain a nearly pure vanilla experience, with very few minor tweaks and plugins to improve gameplay and your experience. There is no economy or money system, and there never will be, nor server-owned shop to buy supplies. Players are encouraged to trade/barter with each other for what they need, and if so choose set up their own personal shops for player trading.

General

  • Hopper tick speed and transfer rates match exactly the vanilla settings, so any redstone project that utilizes a hopper clock for a precise timing will work as expected (a common issue on Spigot servers)
  • Player move speed is 135% of normal speed
  • Hunger exhaustion has been decreased for most actions
  • Mob caps have been slightly elevated
@ForeverZer0
ForeverZer0 / Paths.yml
Created Mar 8, 2019
CreeperCraft Paths Config
View Paths.yml
# Paths file - This file will contain all paths that a player is allowed to take. Previously known as 'AdvancedConfig.yml'.
# This file contains (by default) a Test group that shows the basic syntax of this file.
# For more information, go to https://github.com/Armarr/Autorank-2/wiki/How-to-configure-the-Paths.yml-file%3F.
Recruit:
requirements:
time: 12h
exp: 25
blocks moved1: 5000;0 # Foot
blocks moved2: 1000;1 # Boat
blocks broken1: IRON_ORE;128
@ForeverZer0
ForeverZer0 / extconfig.rb
Created Oct 3, 2018
Automatically include/compile all Ruby C extension source files (including subdirectories) using mkmf
View extconfig.rb
require "mkmf"
ext_name = 'my_extension'
excluded = ['x86', 'x64']
dir_config(ext_name)
$srcs = Dir.glob("#{$srcdir}/**/*.c").map { |path| File.basename(path) }
Dir.glob("#{$srcdir}/*/") do |path|
dir = File.basename(path)
@ForeverZer0
ForeverZer0 / case_conversion.rb
Created Sep 18, 2018
snake_case, camelCase, and PascalCase extension methods for Ruby's String class.
View case_conversion.rb
class String
def snake_case
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
.gsub(/([a-z\d])([A-Z])/,'\1_\2')
.tr("-", "_")
.downcase
end
def camel_case
You can’t perform that action at this time.