Skip to content

Instantly share code, notes, and snippets.

View martialboniou's full-sized avatar

Martial martialboniou

  • Brittany
View GitHub Profile
@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 protected]
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
@martialboniou
martialboniou / ps-inline.shen
Last active December 18, 2015 12:09
ps-inline function to reduce KLambda code in terms of primitives (https://groups.google.com/forum/#!topic/Qilang/Jb9YR1pA_SA)
(define zip
X [] -> []
[] Y -> []
X Y -> (zip-help X Y []))
(define zip-help
X Y Acc -> (reverse Acc) where (or (empty? X) (empty? Y))
[X | Xs] [Y | Ys] Acc -> (zip-help Xs Ys [(@p X Y) | Acc]))
(define substitute
@martialboniou
martialboniou / cl-define+destroy_v2.shen
Created December 27, 2012 19:07
A better prototype for clean define (here: cc-define) and destroy (here: destroy-it) shen functions for partial applications' case in Shen. Usage of call graph to maintain a list of callers to force recompilation of kl code in a host language which doesn't support curry.
\* This script is aimed to run on Shen 7.1 on any Common Lisp port *\
(package property-vector-utilities- [delete-properties]
(define delete-properties
Ref Properties Vec -> (let Pos (hash Ref (limit Vec))
Content (trap-error (<-vector Vec Pos) (/. (protect E) (error "no vector element to retract")))
DeprecatedEntries (map (/. X [Ref X]) Properties)
NewContent (remove-entries DeprecatedEntries Content)
(do (vector-> Vec Pos NewContent)
@martialboniou
martialboniou / cl-define-tests.shen
Last active December 10, 2015 02:38
Test cl-define.shen
\* This script is aimed to run on Shen 7.1 on any Common Lisp port *\
(load "cl-destroy.shen")
(load "cl-define.shen")
\* old behavior *\
(do (output "*** OLD BEHAVIOR ***~%") start)
(define sad-foo X -> (sad-bar X))
(define sad-bar X Y -> (+ X Y))
(trap-error ((sad-foo 5) 2) (/. E (do (output "+++expected error on CL: ~A+++~%" (error-to-string E)) expected-error)))
@martialboniou
martialboniou / cl-define.shen
Created December 24, 2012 12:00
CL fast prototyping of clean define for partial applications in Shen
\* This script is aimed to run on Shen 7.1 on any Common Lisp port *\
\* (load "cl-destroy.shen") *\
\* BEGIN: fast prototyping solution for partial application compatible define *\
(package cl-define [caller-list cc-define]
\* vectors util from vectors library *\
@martialboniou
martialboniou / cl-destroy.shen
Created December 24, 2012 11:58
CL version of destroy for Shen
\* This script is aimed to run on Shen 7.1 on any Common Lisp port *\
(package cl-destroy- [destroy-it]
(define simple-retract
X Vec -> (let Pos (hash X (limit Vec))
(vector-> Vec Pos (fail))))
(define retract
X Vec -> (let Pos (hash X (limit Vec))
Content (trap-error (<-vector Vec Pos) (/. (protect E) (error "no vector element to rectract")))
@martialboniou
martialboniou / gist:2193962
Created March 25, 2012 13:34
temporary simple vimrc workaround
" .vimrc
if has('win32') || has('win64')
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles
if has('gui_running')
if filereadable("C:\\Windows\\Fonts\\DejaVuSansMono.ttf")
set guifont=DejaVu_Sans_Mono:h10
elseif
set guifont=Consolas:h9:cANSI
endif
endif
@martialboniou
martialboniou / js-shen-strings-test.js
Created February 27, 2012 11:20
Shen string functions for UCS-2 and UTF-8 JavaScript REPL
if (("€").length === 3)
{
// UCS2 is not normal encoding
// suppose well-formed UTF-8 is used
// should work with SpiderMonkey multibytes representation
function string_$gt$n(str)
{
fB=str.charCodeAt(0);
return (fB < 128) ? fB :