Skip to content

Instantly share code, notes, and snippets.

View eswak's full-sized avatar
🚀

Erwan Beauvois eswak

🚀
  • Toulouse, France
View GitHub Profile
@eswak
eswak / knapsack-problem.js
Created January 13, 2017 11:08
JavaScript Knapsack problem
// http://rosettacode.org/wiki/Knapsack_problem/0-1
// list all available items
var items = [
{name:"map", weight:9, value: 150},
{name:"compass", weight:13, value: 35},
{name:"water", weight:153, value: 200},
{name:"sandwich", weight: 50, value: 160},
{name:"glucose", weight:15, value: 60},
{name:"tin", weight:68, value: 45},
{name:"banana", weight:27, value: 60},
@eswak
eswak / install-iota2.md
Created November 24, 2017 23:05
Les commandes à exécuter pour installer la chaîne iota2

Installer la chaîne iota2

le 23/11/2017, j'ai installé la chaîne iota2 sur mon pc. J'ai rencontré quelques difficultés pour connaître l'enchaînement des commandes à éxécuter, et pour compiler la chaîne. Voici les différentes étapes que j'ai suivi pour arriver à mes fins.

Etape 1 : télécharger le code

Le code est disponible sur gitlab : https://framagit.org/inglada/iota2

# se déplacer dans le dossier où on veut mettre la chaîne iota2, puis
# clone (télécharge) le code dans le dossier "./iota2"
git clone https://framagit.org/inglada/iota2.git ./iota2
@eswak
eswak / Space Exploration Companies.csv
Last active January 8, 2019 20:22
"New Space" Companies, as of 12/2018.
Name Founded Est. Number of Employees (2016-2018) Country Category Link Description
Ad Astra Rocket Company 2005 30 USA Propulsion http://www.adastrarocket.com Plasma Rocket Propulsion
Alba Orbital 2012 20 UK Smallsat http://www.albaorbital.com/ Smallsat platforms
Altius Space Machines 2010 12 USA LEO Services http://www.altius-space.com/ Developing a tech for RDV with uncooperative satellites
ARCA Space Corporation 1999 400 Romania/USA Launch Services http://www.arcaspace.com/ Space plane
Astrobotic Technology 2008 15 USA Robotics http://www.astrobotic.com/ Selling lunar lander services
Axiom Space 2015 60 USA LEO Services http://axiomspace.com/ Commercial Space Station
Bigelow Aerospace 1999 150 USA Space Tourism http://bigelowaerospace.com/ Modular Space Habitats. Also working on LEO services
Blue Origin 2000 1500 USA Space Tourism https://www.blueorigin.com/ New Shepard : Suborbital tourism ; New Glnn : Reusable LEO launcher
Celestis 1994 USA Space Burial https://www.celestis.com/
@eswak
eswak / offthread.js
Created December 21, 2022 09:10
Easily run a function in a background worker, out of the main UI thread.
function offthread(fn, args, cb) {
var blob = new Blob(
[
'var fn = ' + fn.toString() + ';',
'var ret = fn.call(null, ...' + JSON.stringify(args) + ');',
'postMessage(ret);'
],
{ type: 'text/javascript' }
);