Skip to content

Instantly share code, notes, and snippets.

@gabriel-dehan
gabriel-dehan / tough_boots.json
Last active November 8, 2016 21:43
item mobilelegends
{
"name": "Tough Boots",
"tier": 2,
"price": 890,
"category": "movement",
"components": [ "boots", "magic_resist_cloak" ],
"properties": [
{
"type": "Magic Resistance",
"value": 22,
@gabriel-dehan
gabriel-dehan / component.jsx
Created October 4, 2016 10:05
[React + Lodash] onClick and onDoubleClick events on the same element
var ReadTable = React.createClass({
// ...
onClicked() {
// Array of debounced click events
this.debouncedClickEvents = this.debouncedClickEvents || [];
// Each click we store a debounce (a future execution scheduled in 250 milliseconds)
const callback = _.debounce(_ => {
// YOUR ON CLICKED CODE
@gabriel-dehan
gabriel-dehan / GD
Last active September 30, 2016 16:02
first level : sword1h_020a_01.msh
second level :sword1h_028a_02.msh
third maybe : sword1h_033b_01.msh
fourth final : 1h_016b
final : sword1h_042a_01.msh
Max level 16 (24)
Weapon : Mindwarp (70-111)
@gabriel-dehan
gabriel-dehan / archi.txt
Created September 26, 2016 12:32
Architecture base project html
.
├── base.css
├── images/
│   └── logo.png
├── fonts/
│   └── mapolice.ttf
├── home/
@gabriel-dehan
gabriel-dehan / process_rnning.rb
Created September 20, 2016 09:52
Check if a process name is running
module AppProcess
# - process as a String
def self.running?(process)
name = "[#{process.first}]#{process[1..-1]}"
`ps -ef | grep [s]idekiq`.split("\n").count > 1
end
end
@gabriel-dehan
gabriel-dehan / gdfxpak.json
Created September 16, 2016 08:45
fxpaknames GD
[
[ 0] ",records/fx/skillclass06/primalstrike01_fxpak.dbr,",
[ 1] ",records/fx/skillsother/attackmelee/chaosstrike01_fxpak.dbr,",
[ 2] ",records/fx/creatures/voidfiendspawn01_fxpak.dbr,",
[ 3] ",records/fx/skillsother/attackmelee/chaosstrike01_fxpak.dbr,",
[ 4] ",records/fx/skillclass04/shadowstrike1_target_fxpak.dbr,",
[ 5] ",records/fx/skillclass04/shadowstrike1_activate_fxpak.dbr,",
[ 6] ",records/fx/skillclass04/multistrike1_activate_fxpak.dbr,",
[ 7] ",records/fx/skillsother/attackmelee/mortalstrike01_fxpak.dbr,",
[ 8] ",records/fx/skillsother/attackmelee/acidstrike01_fxpak.dbr,",
@gabriel-dehan
gabriel-dehan / SpecialAnimations
Created September 15, 2016 18:26
GrimDawn Extracted Data
[
[ 0] "SpinAttack",
[ 1] "Mirage",
[ 2] "Summon",
[ 3] "EnergyAbsorb",
[ 4] "ChainLaser",
[ 5] "LightOfRa",
[ 6] "MultiStar",
[ 7] "Teleport",
[ 8] "TelkineTelekinesisStart",
@gabriel-dehan
gabriel-dehan / controller_pdf.rb
Created August 18, 2016 10:40
PDF GENERATIOn
class Controller < ApplicationController
def print
page_midi = render_to_string('print_midi') # print_midi.html.erb
page_soir = render_to_string('print_soir') # print_soir.html.erb
pdf_midi = PDFKit.new(page_midi, :page_size => 'Letter')
pdf_soir = PDFKit.new(page_soir, :page_size => 'Letter')
pdf_midi.to_pdf
pdf_soir.to_pdf
@gabriel-dehan
gabriel-dehan / README.md
Last active March 26, 2018 06:17
Screepsocracy

A screeps world is composed of many rooms. You start as the god of the room. What do you do ? You create a distopian democracy.

Sssh bby is ok.

Ticks

The cruel world of screeps is ruled by the almighty tick. Which means that everything gets reconsidered every few seconds.

Government

var Memory = (function() {
return {"creeps":{"Aria":{"role":"builder","features":["build","transport"],"state":"harvest"}},"spawns":{},"rooms":{},"flags":{},"strategies":{"mainStrategy":"main","current":"boot","electedSince":0,"queue":["boot"],"main":{"state":"progressing","creepSpawner":{"state":"progressing"}},"undefined":{"state":"latent","creepSpawner":{"state":null}}}};
});
var test = {
mx: function() {
this.name = 'main';
console.time('Naccess');
Memory().strategies[this.name].creepSpawner.state;
console.timeEnd('Naccess');