Skip to content

Instantly share code, notes, and snippets.

View Phury's full-sized avatar

Pierre-Henri Phury

View GitHub Profile
@Phury
Phury / fnm_results.tsv
Last active July 30, 2021 21:11
Results of my FNM games
date format deck link overall result match 1 deck 1 match 2 deck 2 match 3 deck 3
27/03/2020 legacy jund phoenix https://www.mtggoldfish.com/deck/3786991#paper 1-2 2-1 monored prison 1-2 u/w stoneblad 2-0 bomberman
23/07/2020 legacy jund phoenix https://www.mtggoldfish.com/deck/4171748#paper 2-1 0-2 monoblack reanimator 2-0 TES 2-1 burn
30/07/2020 modern twiddle storm https://www.mtggoldfish.com/deck/4190194#paper 1-2 2-1 ally 0-2 Tron 2-0 elves
@Phury
Phury / cmkTableToTsv.js
Last active February 23, 2024 20:04
Export CardMarket tables in TSV (and copies to clipboard)
function mapRow(row) {
return Array.from(row.cells).map(cell => {
if (cell.className.indexOf('amount') > -1) return cell.textContent.replace('x', '');
if (cell.className.indexOf('name') > -1) return cell.textContent;
if (cell.className.indexOf('price') > -1) return cell.textContent;
return null;
})
.filter(parsed => parsed !== null)
.join(' ');
{
"meta": {
"theme": "stackoverflow"
},
"basics": {
"name": "Pierre-Henri Van de Velde",
"label": "IT Architect, Competence Leader for Developers",
"image": "https://avatars1.githubusercontent.com/u/154954?s=40&v=4",
"summary": "I have a passion for building software. I can concile abstract thinking with the concrete world. I apply my knowledge to build quality software. I’m not only a geek but also very social. I work well in teams and love to solve problems.\nMy goal is to become an excellent software architect but I still want to keep a hand in the code. As part of my senior role I help junior developers excelling in their work. I’ve always worked in Agile settings and I’m comfortable with all the tools used by the DevOPS. I can easily implement those best practices if it is needed. I’m solution oriented and do not like to tinker too much about things that will not be.",
"website": "http://phury.github.io/",
date activity amount unit
16-03-2020 suburi 100 reps
17-03-2020 suburi 100 reps
18-03-2020 suburi 100 reps
19-03-2020 suburi 150 reps
19-03-2020 suburi 150 reps
26-10-2020 running 25 minutes
28-10-2020 running 25 minutes
02-11-2020 running 25 minutes
04-11-2020 running 25 minutes
@Phury
Phury / angularjs-auth-init.js
Last active October 19, 2018 09:33
authorization initialization code with angularjs
/*
references:
https://medium.com/opinionated-angularjs/techniques-for-authentication-in-angularjs-applications-7bbf0346acec
https://arthur.gonigberg.com/2013/06/29/angularjs-role-based-auth/
*/
.factory('authService', () => {
var Session = {};
var authService = {};
authService.isAuthenticated = () => {
@Phury
Phury / decks.yaml
Created November 15, 2017 11:21
A yaml file containing my magic decks for Yawgmoth
decks:
- name: B/W Zombies
description: Amonkhet B/W Zombie deck
tags: [zombies, budget, tribal, amonkhet]
submittedBy: Phury
cards:
- 2 Tattered Mummy
- 1 Splendid Agony
- 2 Cartouche of Solidarity
- 3 Binding Mummy

Keybase proof

I hereby claim:

  • I am Phury on github.
  • I am phury (https://keybase.io/phury) on keybase.
  • I have a public key whose fingerprint is 06B0 36D5 C601 1EBD AF15 F5B2 B3E1 9597 11AA 8B68

To claim this, I am signing this object:

@Phury
Phury / join first names
Created September 24, 2014 13:23
Join strings and use the map() function
List<Person> list = Arrays.asList(
new Person("John", "Smith"),
new Person("Anna", "Martinez"),
new Person("Paul", "Watson ")
);
String joinedFirstNames = list.stream()
.map(Person::getFirstName)
.collect(Collectors.joining(", ")); // "John, Anna, Paul"
@Phury
Phury / callNTimes.js
Created December 11, 2013 20:39
javascript function that automatically unregister itself from an event after N calls
function callNTimes(el, event, func, noOfTimes) {
var noOfCalls = 0;
var fun = function() {
(noOfTimes > noOfCalls++) ? func.apply(this, arguments) : el.removeEventListener(event, fun);
};
el.addEventListener(event, fun);
}