Skip to content

Instantly share code, notes, and snippets.

@koemeet
koemeet / dump.h
Created July 7, 2017 00:34
Rust dump 06-07-2017
Class: ConsoleGen
All flags 0x16 offset: 0x0 ConsoleSystem.Command[] MONO_TYPE_SZARRAY
Class: AutoTurret
__menuOption_MenuAuthorize flags 0x1 offset: 0x2e8 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuClearList flags 0x1 offset: 0x340 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuDeauthorize flags 0x1 offset: 0x398 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuTurretAttackAll flags 0x1 offset: 0x3f0 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuTurretDisable flags 0x1 offset: 0x448 GameMenu.Option MONO_TYPE_VALUETYPE
@koemeet
koemeet / dump.h
Last active June 8, 2017 21:00
Rust dump 8-6-2017
Class: ConsoleGen
All flags 0x16 offset: 0x0 ConsoleSystem.Command[] MONO_TYPE_SZARRAY
Class: AutoTurret
__menuOption_MenuAuthorize flags 0x1 offset: 0x2e8 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuClearList flags 0x1 offset: 0x340 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuDeauthorize flags 0x1 offset: 0x398 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuTurretAttackAll flags 0x1 offset: 0x3f0 GameMenu.Option MONO_TYPE_VALUETYPE
__menuOption_MenuTurretDisable flags 0x1 offset: 0x448 GameMenu.Option MONO_TYPE_VALUETYPE
@koemeet
koemeet / Scanner.cpp
Last active November 5, 2017 18:28
Dynamic recursive pointer scanner
#include "Scanner.h"
#include <sstream>
#include <fstream>
Scanner::Scanner(uintptr_t base, char* outputFile) : base(base), outputFile(outputFile)
{
}
void Scanner::scan(char *compareScan)
@koemeet
koemeet / README.md
Last active February 24, 2017 23:01
Git submodules

Checklist, new feature:

  1. Go into main repo and verify you are on the master branch. Now run git pull && git submodule update.
Right now your main repo is up-to-date with the remote and all submodules are in a state the main repo rquires.
NOTE: Submodules are now probably in a detached state (detached HEAD), which is good. The main repo links to a specific commit (sha1 hash)
# UI Object for console interactions.
@ui = Vagrant::UI::Colored.new
# Install required plugins if not present.
required_plugins = ["vagrant-triggers", "vagrant-gatling-rsync"]
required_plugins.each do |plugin|
need_restart = false
unless Vagrant.has_plugin? plugin
system "vagrant plugin install #{plugin}"
need_restart = true
@koemeet
koemeet / Translator.php
Last active January 19, 2017 16:55
Symfony translations database clear cache method
<?php
namespace AppBundle\Translation;
use Symfony\Component\Translation\Translator as BaseTranslator;
class Translator extends BaseTranslator
{
/**
* @var TranslationRepositoryInterface
*/
import Ember from 'ember';
import DS from 'ember-data';
var get = Ember.get;
var isNone = Ember.isNone;
var merge = Ember.merge;
export default DS.JSONAPISerializer.extend({
keyForAttribute(key, method) {
@koemeet
koemeet / ee.js
Last active March 25, 2016 16:28
Inverse relationships issue
// app/models/product.js
export default DS.Model.extend({
masterVariant: DS.belongsTo('product-variant'),
variants: DS.hasMany('product-variant') // only contains the variants that are not master
});
// app/models/product-variant.js
export default DS.Model.extend({
product: DS.belongsTo('product', { inverse: null }),
master: DS.attr('boolean')
// routes/company/clients.js
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
let company = this.modelFor('company');
// this
return this.get('store').query('client', {
company: company.get('id')
import Ember from 'ember';
import DS from 'ember-data';
export default Ember.Component.extend({
store: Ember.inject.service(),
showOptions: true,
types: [
'country',
'province',