Skip to content

Instantly share code, notes, and snippets.

View vjeux's full-sized avatar

Christopher Chedeau vjeux

View GitHub Profile
[0] => "#785 { \xe2\x80\x93}"
[1] => "#813 { \xe2\x80\x94}"
[2] => "#1346 { \xe2\x80\x9c}"
[3] => "#1768 { \xe2\x80\x9e}"
[4] => "#2683 {----------------}"
[5] => "#3178 {.\xe2\x80\x9d}"
[6] => "#3995 {,\xe2\x80\x9d}"
[7] => "#4189 {********}"
[8] => "#4291 {:\xe2\x80\x89}"
[9] => "#4936 {========}"
@vjeux
vjeux / difficulty.js
Created July 12, 2021 06:32
Trackmania fetch difficulty
/*
>> node difficulty.js qDkVXW6pEqrwH0WP86jilQW4uZ8
{ rankAT: 629, rankGold: 4332, rankSilver: 7256, rankBronze: 8158 }
>> node difficulty.js qDkVXW6pEqrwH0WP86jilQW4uZ8
$i$o$s$c30Vashj'ir { rankAT: 629, rankGold: 4332, rankSilver: 7256, rankBronze: 8158 }
>> node difficulty.js 5yg9Ga2Kh11Ow2b4E9f4_viMo_h
$o$s$n$fffT$0ffhe $fffB$0ffank $fffR$0ffobbery { rankAT: 423, rankGold: 5425, rankSilver: 7641, rankBronze: 8913 }
(517) >> yarn test
Using globally installed version of Yarn
yarn run v1.12.1
$ jest src/*
(node:37909) UnhandledPromiseRejectionWarning: Error: Callback didn't resolve
(node:37909) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:37909) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:37909) UnhandledPromiseRejectionWarning: Error: Callback didn't resolve
(node:37909) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function
@vjeux
vjeux / tldr.md
Last active April 26, 2020 01:37

tldr of https://serokell.io/blog/2018/12/17/why-dependent-haskell

Standard Haskell: Ergonomics + Performance

He basically wants a language with a type system that lets you ensure that reading an element at an arbitrary position is safe and cannot crash because the index is always within the range of the array. He goes through all the mainstream languages and finds out that none would work.

Agda: Ergonomics + Correctness

He gives an example of a language that has this property, Agda. It's actually not a traditional language but a proof assistant. The way lookup is defined is the following way:

@vjeux
vjeux / x.md
Last active January 6, 2024 07:15
Ocaml / functional programming

I'm taking down this post. I just posted this as a side comment to explain a sentence on my latest blog post. This wasn't meant to be #1 on HN to start a huge war on functional programming... The thoughts are not well formed enough to have a huge audience. Sorry for all the people reading this. And please, don't dig through the history...

diff --git a/modules/nuclide-commons-ui/styles/Table.less b/modules/nuclide-commons-ui/styles/Table.less
index 8e672829a..2c73ab617 100644
--- a/modules/nuclide-commons-ui/styles/Table.less
+++ b/modules/nuclide-commons-ui/styles/Table.less
@@ -30,8 +30,7 @@
width: 100%;
}
-.nuclide-ui-table-header-cell,
-.nuclide-ui-table-body-cell {
diff --git a/modules/nuclide-commons-ui/styles/Checkbox.less b/modules/nuclide-commons-ui/styles/Checkbox.less
index 729a6d725..48ab20fc9 100644
--- a/modules/nuclide-commons-ui/styles/Checkbox.less
+++ b/modules/nuclide-commons-ui/styles/Checkbox.less
@@ -1,7 +1,8 @@
@import "ui-variables";
.nuclide-ui-checkbox-label, .nuclide-ui-toggle-label {
- margin-bottom: 0; // This is to override a default in bootstrap.
+ margin-bottom: 0;
(592) >> find ../apollo-client/ -name '*.ts' | xargs bin/prettier.js --parser typescript --debug-check
../apollo-client//benchmark/index.ts
../apollo-client//benchmark/util.ts
../apollo-client//fetch-mock.typings.d.ts
prettier(input) !== prettier(prettier(input))
Index:
===================================================================
---
+++
@@ -27,5 +27,5 @@
(521) >> find . -name '*.ts' | xargs ~/random/prettier/bin/prettier.js --parser typescript --debug-check
./benchmark/index.ts
./benchmark/util.ts
ast(input) !== ast(prettier(input))
Index:
===================================================================
---
+++
@@ -1599,27 +1599,26 @@
"operator": "||",
This file has been truncated, but you can view the full file.
prettier vjeux$ find ../TypeScript/tests/ -name '*.ts' | grep -v "'" | xargs ./bin/prettier.js --parser typescript --debug-check
../TypeScript/tests/baselines/reference/project/declarationDir/amd/declarations/a.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/amd/declarations/subfolder/b.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/amd/declarations/subfolder/c.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/node/declarations/a.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/node/declarations/subfolder/b.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir/node/declarations/subfolder/c.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir2/amd/declarations/a.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir2/amd/declarations/subfolder/b.d.ts
../TypeScript/tests/baselines/reference/project/declarationDir2/amd/declarations/subfolder/c.d.ts