Skip to content

Instantly share code, notes, and snippets.

Avatar

Legoboy0215 legoboy0215

View GitHub Profile
@jojoe77777
jojoe77777 / metadata.md
Last active Feb 27, 2019
Helpful metadata information
View metadata.md
ID Description Type
1 Air Short
2 Name tag String
3 Name visibility Byte
4 Silent Byte
7 Potion bubbles Int
12 Baby zombies Byte
14 Baby animals, wolf data (angry) Byte
16 Sheep/Villager type, also slime size, and pig saddle Byte
View Farewell.md

Farewell

A few days ago I tweeted and profile-posted this message:

靜雞雞咁我走啦,好似我靜雞雞咁嚟,fing 一 fing 件衫,唔拎走一舊雲。 嗰棵榆樹下面潭水,唔係泉水而係彩虹,喺藻葉之間搓碎,將彩虹咁既夢整沉左

Yes, I am serious about this message. I am leaving (very soon).

@byteandahalf
byteandahalf / customblocksnippet.cpp
Last active Feb 7, 2016
Add a custom block to Minecraft Windows 10 Edition (not complete code)
View customblocksnippet.cpp
static uintptr_t** mBlocks = (uintptr_t**) (((uint8_t*)baseAddr) + 0xA75750);
static TextureUVCoordinateSet myCustomTexture{0.0F,0.0F,0.0625F,0.0625F,16,16,1,1};
TextureUVCoordinateSet& customGetTexture()
{
return myCustomTexture;
}
uint32_t customGetColor()
{
View Im.md

[QUOTE="TheDeibo, post: 142836, member: 16757"]correction: shoghi OR shoghicp[/QUOTE] That's not important. [QUOTE="Legoboy0215, post: 142835, member: 18294"]Hi: I am a very very inactive dev on ImagicalMine. I contributed a lot on the early days where there was a skin bug, chest bug, and etc. At start, ImagicalCorp consisted of members of… [USER=29074]@k3ithkfng[/USER]'s server's staff. We thought: "Wow, where did shogi go?" So we started. I still don't get the reason why [USER=29074]@k3ithkfng[/USER] did not fork the repo, but it's too late :)

We tried our best, and I tried my best typing this on my paperwhite XD Hope this answers your question.

TL; DR:

@PEMapModder
PEMapModder / mysqli.php
Created Jan 20, 2016
Simple MySQL client written in PHP
View mysqli.php
#!/usr/bin/env php
<?php
if(!defined("STDIN")) define("STDIN", fopen("php://stdin", "R"));
$host = "localhost";
$user = "root";
$password = "";
$schema = "";
$opts = getopt("h:u:p:s:");
View import.sh
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."
View dot.php
<?php
/**
* @param number $x the X coordinate of the center of the circle
* @param number $y the Y coordinate to place particles at
* @param number $z the Z coordinate of the center of the circle
* @param number $radius the distance for each dot from the center
* @param number $step the angle per step, in degrees
* @param callable $callback the function to call for each dot, with parameters $x, $y, $z representing the coordinates of the dot
*/
@ericandrewlewis
ericandrewlewis / index.md
Last active Nov 26, 2020
C++ Pointer Tutorial
View index.md

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.

@shoghicp
shoghicp / commands.md
Last active May 25, 2018
Some interesting commands to play with the new NBT support for items.
View commands.md

Items with custom name

give sho stick 1 {display:{Name:"§r§6§lNormal stick"}}

Items with enchantments

give sho gold_sword 1 {ench:[{id:9s,lvl:2s}]}
View MarqueeTask.php
<?php
namespace shoghicp\MinecraftSimulator\task;
use pocketmine\Player;
use pocketmine\scheduler\PluginTask;
use shoghicp\MinecraftSimulator\Loader;
class MarqueeTask extends PluginTask{
You can’t perform that action at this time.