Skip to content

Instantly share code, notes, and snippets.

# Mathieu PATUREL math2001

Last active October 27, 2020 07:16
demos

I wanted to learn how to do isometric rendering:

And I wanted to learn about A* (how do you get out of a maze, quickly)

I wanted to learn how to make multiplayer games (running over TCP):

Last active June 4, 2020 01:00

# Can a function z = f(x, y) have an inverse (x, y, z in R)

## Surface points with distinct heights

If we think of z = F(x, y) as describing a surface, then this question translates to asking:

Can one find a continuous surface for which every distinct point on that surface has a unique height

Created March 6, 2020 11:07
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 with(LinearAlgebra) a := b := solve(Equate(a, b))
Created December 12, 2019 02:31

### Keybase proof

I hereby claim:

• I am math2001 on github.
• I am math2001 (https://keybase.io/math2001) on keybase.
• I have a public key ASCzjxjUj_-ujbKB9g5mjtFSR3vYtbkUTpa1GYbcV1AWJQo

To claim this, I am signing this object:

Created September 23, 2018 06:42
Oriented object programmation explained
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # We are going to use an analogy of building houses to understand OOP. # A class is like the plan/design of the house. It's the theory, nothing concrete. # Our house has different properties (such as the colour, the number of doors, etc), these are called attributes. # Our house has different behaviours (such as starting the alarm, locking every doors, etc), these are called methods. # An instance, however, is the real thing. From one plan, one design, one *class*, we can make as many actual houses as we like # And we can change them. For example, one house (an instance), might have 2 doors, where as an other one might have 4 doors. # But they still have the same plan
Created July 7, 2018 09:00
Ping every ip on the local network
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #! /usr/bin/sh trap 'exit' SIGINT for i in `seq 254`; do (ping 192.168.1.\$i -c 1 -w 1 > /dev/null && echo 192.168.1.\$i)& done wait
Created April 26, 2018 02:35
Possibly the simplest version of a chat server made with Python

You can build a client in Python if you feel like it, but you might as well just use `telnet`:

``````\$ telnet localhost 9877
``````
Created February 2, 2018 07:01
Set cookie on the whole site forever from JavaScript
Last active August 8, 2017 06:51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 var copyToClipboard = (function () { const textarea = document.createElement('textarea') // hide the textarea (since we can't use display: none, it's a bit long) textarea.style.opacity = 0 textarea.style.width = 0 textarea.style.height = 0 textarea.style.position = 'absolute' textarea.style.bottom = '-100%' textarea.style.left = '-100%'
Created June 24, 2017 06:24
How do I add a path to your PATH environment variable on Windows?

# How do I add a path to your PATH environment variable on Windows?

1. Open the `Control Panel`.
2. Go to `System and Security`.
3. Go to `System`.
4. On the left, click on `Advanced system settings` (you need to have administrator privileges to do so)
5. Click on `Environment Variables`
6. Click on `Path` in the top box
7. Click `Edit`