Skip to content

Instantly share code, notes, and snippets.

View diamondo25's full-sized avatar
🔥
rm -rf --no-preserve-root /

Erwin Oegema diamondo25

🔥
rm -rf --no-preserve-root /
View GitHub Profile
@diamondo25
diamondo25 / app.scss
Last active November 21, 2016 13:33
Implement Materialize starter template into Ember (without ember-cli-materialize)
// app/styles/app.scss
@import "materialize";
// From http://materializecss.com/templates/starter-template/css/style.css
.icon-block {
padding: 0 15px;
}
.icon-block .material-icons {
@diamondo25
diamondo25 / shop data.sql
Created November 1, 2016 16:54
Miu shop
INSERT INTO `mcdb`.`user_shop_data` (`shopid`,`npcid`,`recharge_tier`) VALUES
(5450000, 9090000, 1);
INSERT INTO `mcdb`.`user_shop_items` (`shopid`, `itemid`, `quantity`, `price`, `sort`) VALUES
(5450000, 2000002, 1, 100, 24),
(5450000, 2000006, 1, 200, 23),
(5450000, 2002017, 1, 5000, 22),
(5450000, 2002018, 1, 5000, 21),
(5450000, 2002020, 1, 2800, 20),
(5450000, 2002021, 1, 2800, 19),
@diamondo25
diamondo25 / Vana lua classes.patch
Created October 17, 2016 22:49
Vana lua classes
diff --git a/src/channel_server/lua/lua_scriptable.cpp b/src/channel_server/lua/lua_scriptable.cpp
index bb6cbd6..cfd12cd 100644
--- a/src/channel_server/lua/lua_scriptable.cpp
+++ b/src/channel_server/lua/lua_scriptable.cpp
@@ -176,6 +176,7 @@ auto lua_scriptable::initialize() -> void {
expose("useItem", &lua_exports::use_item);
// Player
+
expose("deletePlayerVariable", &lua_exports::delete_player_variable);
@diamondo25
diamondo25 / COMMANDS.md
Last active January 23, 2018 01:44
BMS v.8 commands

Admin Commands

Level 1 Admin (0x01)

  • /w (charactername) (message)
    Send warning (message) to (charactername)
  • /d (inventory number)
    Destroys item from (inventory number), starting from first slot (until an item is found)
  • /block (charactername)
    Blocks (charactername)'s account from logging in
  • /ban (charactername)
    Kick (charactername) from the channel
@diamondo25
diamondo25 / wcf-datetime-parsing.scala
Created February 24, 2016 16:21
Parsing (from and to) WCF DateTime json input to joda DateTime
private val microsoftDateWithTZ = """\/Date\(([0-9]+)([\-\+])([0-9]{2})([0-9]{2})\)\/""".r
private val microsoftDateWithoutTZ = """\/Date\(([0-9]+)\)\/""".r
implicit val jodaDateTimeReads = Reads[DateTime]({
case JsString(microsoftDateWithoutTZ(ticks)) =>
JsSuccess(new DateTime(ticks.toLong))
case JsString(microsoftDateWithTZ(ticks, upOrDown, hours, minutes)) =>
val hoursInt = hours.dropWhile(_ == '0').toIntOpt.getOrElse(0)
val minutesInt = minutes.dropWhile(_ == '0').toIntOpt.getOrElse(0)
@diamondo25
diamondo25 / test.css
Created October 21, 2015 13:05
CSS bug
.featured-product {
margin-bottom: 20px;
.featured-product-image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
height: 378px;
position: relative;
/*
@diamondo25
diamondo25 / main.go
Created July 31, 2015 21:44
Golang MapleStory Exepatch/MapleStory(t).exe version identifier
package main
import (
"encoding/hex"
"flag"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@diamondo25
diamondo25 / main.go
Created July 31, 2015 21:42
Golang MapleStory ManualPatcher patchfile exporter
package main
import (
"bytes"
"encoding/binary"
"encoding/hex"
"errors"
"flag"
"fmt"
"io"
@diamondo25
diamondo25 / script.idc
Created July 30, 2015 12:02
MapleStory IDC script
// IDC script for identifying functions and such
#include <idc.idc>
#define RenameFunction(a, b) Message("Found %s at %a\r\n", b, a); MakeName(a, b)
#define START_ADDR 0x00400000
static main() {
auto addr = BADADDR;
auto onMovePacket = FindAoBAndRename("25 0C FE FF FF 05 E8 03", "?OnMovePacket@CMovePath@@QAEXAAVCInPacket@@H@Z");
@diamondo25
diamondo25 / main.go
Last active January 27, 2016 22:23
Golang NGM patches crawler
package main
import (
"errors"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"strconv"