Skip to content

Instantly share code, notes, and snippets.

View mildred's full-sized avatar

Mildred Ki'Lya mildred

View GitHub Profile
@mildred
mildred / README.md
Last active February 4, 2016 08:41
WebAssembly Dynamic Linking

WebAssembly Modules Virtual Memory and Dynamic Linking

A module can link to another module to access its functions. There are multiple ways to link modules together depending on how we want to share the virtual memory:

  • the importer and the imported share the same virtual memory
  • the importer and the imported don't share any virtual memory segment
  • the imported is loaded in the virtual memory of the importer but doesn't have access to it
  • the imported module have access to the importer virtual memory, but the importer don't have access to the imported memory
@mildred
mildred / README.md
Last active March 4, 2016 13:35
Deploying package with IPFS

Declare a Repository

  • create a IPNS namespace (key pair) for the binary tree
  • create a IPNS namespace (key pair) for the debian repository

Building

  • build the package (manual process or managed by a continuous deployment tool like go.cd or strider
@mildred
mildred / README.md
Last active February 10, 2022 14:48
multifirefox

multifirefox: have multiple firefox profiles

Equivalent of firefox -P PROFILE_NAME -no-remote but with the remote enabled.

Multifirefox is a way to have multiple firefox profiles and open links in them. There are multiple ways of invocation:

multifirefox PROFILE_NAME ...

Start Firefox with the profile PROFILE_NAME (or open a new window in the existing firefox instance).

@mildred
mildred / README.md
Created April 11, 2016 07:59
tuleap import script

Run import.sh to import project into tuleap running in docker. For it to work, you must:

cd path/to/tuleap/source/repository/
mkdir -p test_import
vim test_import/import.sh

Usage:

import.sh optvar=value

@mildred
mildred / README.md
Created April 29, 2016 13:07
Énergeie libre et force contre électromotrice

Points clefs pour réduire les dépenses énergétiques dans une machine tournante électrique :

  • Lorsque le champ magnétique d'une bobine s'effondre, il est possible de récupérer le courant en sortie de la bobine provenant de l'effondrement du champ magnétique et stocker l'énergeie dans un cendensateur pour la réutiliser et réalimenter une bobine peu après. Le fait qu'une self décale dans le temps le passage du courant permet cela.
  • Trouver un agencement de la machine tournante qui permet d'éviter que le champ magnétique soit orthogonal aux fils. Utiliser une technique de switching qui coupe les bobines lorsqu'elles sont en situation contre productive.
  • Relié au premier point : alimenter les bobines par des impulsions qui prennent fin rapidement et récupérer l'énergie de l'effondrement du champ magnétique
  • Réduire la résistance du fil. En restant sur du cuivre, c'est difficile.

Références : Paul Babcock.

@mildred
mildred / Théorie du Genre et Transsexualité.md
Last active May 10, 2016 06:28
Théorie du Genre et Transsexualité

Théorie du Genre et Transsexualité

Mildred, 1er Février 2014, 9 mai 2016

Qu'est-ce que la transsexualité ? Quel rapport avec la théorie du genre ? Comment les deux vont-ils ou ne vont-ils pas ensemble ? Je vous propose une petite exploration, fruit de mon expérience personnelle.

Définitions

@mildred
mildred / aliases.sh
Created June 13, 2016 13:37
ccut, ccopy, cpaste command line
chelp() {
echo "chelp - this help" >&2
echo "ccopy FILE... - copy these files to the cclipboard" >&2
echo "ccut FILE... - move these files to a temp dir and put them in the cclipboard" >&2
echo "cpaste [-c] - copy the files in the cclipboard in the current directory" >&2
echo "cmove - moves the files in the cclipboard in the current directory" >&2
echo "clist - list the files in the cclipboard" >&2
echo "cclear - clear the cclipboard and remove temporary files" >&2
}
ccopy() { sed 's:^: :' ~/.cache/cclist >&2; for i in "$@"; do echo "$PWD/$i" >> ~/.cache/cclist; echo "+ $PWD/$i">&2; done }
<html>
<head>
<meta charset="utf-8"/>
<script src="citojs/dist/cito.js"></script>
<script>
window.addEventListener('load', function(){
var items = [
{tag: 'li', children: 'text'}
];
@mildred
mildred / index.md
Created December 28, 2016 09:30
Programming good practices

Inspired by the golang language, especially its interfaces that allows decoupling without introducing dependencies.

First, some guidelines that shows the direction to take but with no hard rules:

  • Separate private imports from public imports. Private imports are only needed for the implementation. Public imports are exposed to other modules and are visible to them because their types appear in public function signatures or public types.

  • In public module interface, avoid using types from other modules that are not completely abstracted as an interface type. Do not use pointer to struct defined elsewhere in your public function arguments. Except probably from platform types (*net.URL or *context.Context probably applies).

  • Use basic types with no object characteristics, no defined methods, in public module interfaces. Better to rely on value to be a good exchange format than on complex objects that return objects and objects. This simplifies code and ensures that there is no side effects. Data layou

@mildred
mildred / terraform.tfstate
Last active February 2, 2017 09:06
Terraform issue #11518
{
"version": 3,
"terraform_version": "0.8.5",
"serial": 2,
"lineage": "a6fcb1cc-d67d-425c-8428-8f8a62de4862",
"modules": [
{
"path": [
"root"
],