Skip to content

Instantly share code, notes, and snippets.

View martialboniou's full-sized avatar

Martial martialboniou

  • Brittany
View GitHub Profile
@martialboniou
martialboniou / JavaScriptSnippets.md
Last active March 16, 2021 13:00
JavaScript DIGEST

Here's some random memos about JavaScript.

Important notes

  • NaN is a number (?); operators on NaN yields into NaN except in the + case with a string (as below);

  • IMPORTANT: if we write (x + y) with x as a number and y as a string, it yields into a string (because + is mainly a string concatenation operator); but if + is another math operator (eg: *), it yields into a number; another important case of +: 1 + true yields into 2 because true(otherwise false or null) is converted into 1 (0 respectively); 1 + undefined yield into NaN; "1" + null yields into "1null";

  • beware of precision issues with floating-point numbers (because JS uses binary form to represent decimal numbers internally); try to remove the floating point (multiply by 10eX where X is a positive integer) then calculate, finally then divide by the same multiplier;

  • remember the ternary operator: (condition) ? yes : no;

  • IMPORTANT (of for arrays, strings, in for objects):

@martialboniou
martialboniou / JavaSnippets.md
Last active March 21, 2021 20:19
Java Snippets
@martialboniou
martialboniou / symfonyFirstTutorial.md
Last active March 5, 2021 11:21
Symfony first auth tutorial
@martialboniou
martialboniou / SQLtutorial.md
Last active March 1, 2021 22:40
SQL tutorial

SQL DIGEST

Basics

Here's some SQL fundamental reminders.

  • IMPORTANT: DON'T USE utf8; I use utf8mb4_0900_ai_ci;
  • \G to terminate a SQL statement instead of ; displays the result vertically rather than normal tabular format if they are too wide for the current window;
@martialboniou
martialboniou / PHPtutorial.md
Last active March 4, 2021 12:32
PHP 7 tutorial

PHP7 DIGEST

Here's some tips/snippets for PHP7 (knowledge of PHP5 required).

Please install Github Mermaid extension for Firefox/Chrome to display the diagrams in this document.

Useful functions & vars

@martialboniou
martialboniou / bootstrap4tutorial.md
Last active March 1, 2021 22:44
Bootstrap 4/5 tutorial

BOOTSTRAP DIGEST

NOTE: As much as I can I will try to do the bootstrap 4 tutorial and learn BS5. The demos in the root of this directory are BS5; the subdirectory BS4 contains the demos from tutorialrepublic for the stable but soon deprecated BS4

Please install Github Mermaid extension for Firefox/Chrome to display the diagrams in this document.

Bootstrap basics

@martialboniou
martialboniou / classy_comment_header_example.filter
Created July 18, 2015 11:23
Example of header w/ Obsolete flasks for Antnee's Classy Item Filter 1.69
### Show #Misc - Chance Items
### Show #Misc - Chisel Hammers
### Show #Gems - Active Skill Gems Zero Quality
### Show #Gems - Support Gems Zero Quality
### Show #Jewelry - Magic ILVL <= 68
### Show #Jewelry - Normal ILVL <= 68
### Hide #Jewelry - Magic ILVL > 68
### Show #Jewelry - Normal ILVL > 68
### Show #Flasks - Quality
### Show #Flasks - Utility
@martialboniou
martialboniou / armour.py
Last active August 29, 2015 14:22
Generate a Path of Exile loot filter code for Armour
#!/usr/bin/env python3
# DEPRECATED
# go to https://github.com/martialboniou/poe_filter_demo
@martialboniou
martialboniou / Classy Item Filter
Last active July 23, 2021 21:05 — forked from Antnee83/Classy Item Filter
3.15a: Expedition League (testing!)
# Hondana's Classy Filter! v3.15.0a AKA Flashy Filter!
# A fork of the popular Antnee's Classy Filter! by hondana
# Status: Untested
# URL: https://gist.github.com/martialboniou/021bc8d9e9250e00fd7b
# Dedicated Program: Loot Wizard v0.3 (unpublished)
# Sync Version: Antnee's Classy Filter! v3.0a (but 000e section AKA Rares;
# - no pure 75+ T1 gear like in the original version, but;
# - progressive optimistic rare filtering at every levels here.)
# + 2017-03-01 Skill Tree Information
# (https://www.pathofexile.com/forum/view-thread/1840246)
() {
local NAME="My NAME"
local EMAIL=my@email.com
git config --global user.name "$NAME"
git config --global user.email $EMAIL
git commit --amend --reset-author
git config --global credential.helper cache
git config --global alias.st status
git config --global alias.rl reflog
git config --global alias.ci commit