This file contains hidden or 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/env python | |
| from mastodon import Mastodon | |
| import os.path | |
| instanceBaseURL = "https://cybre.space" | |
| if ( not os.path.isfile("nonMutuals_clientcred.secret")): | |
| Mastodon.create_app( | |
| 'nonMutuals', |
This file contains hidden or 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
| /* | |
| Quick SDL2 wrapper for uPNG | |
| d@revenant1.net | |
| This code is public domain. | |
| */ | |
| // https://github.com/elanthis/upng | |
| #include "upng/upng.h" | |
| #include <SDL2/SDL.h> |
This file contains hidden or 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
| /* | |
| Copyright (c) 2024 Orson Peters <orsonpeters@gmail.com> | |
| This software is provided 'as-is', without any express or implied warranty. In no event will the | |
| authors be held liable for any damages arising from the use of this software. | |
| Permission is granted to anyone to use this software for any purpose, including commercial | |
| applications, and to alter it and redistribute it freely, subject to the following restrictions: | |
| 1. The origin of this software must not be misrepresented; you must not claim that you wrote the |
This file contains hidden or 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
| /* | |
| IMPORTANT!!! DO NOT USE THIS. It works, but you'll probably get it wrong, | |
| because it must be keyed with at least 128 bits of entropy, and where | |
| do you get this entropy, huh? | |
| - In a browser, you get it from window.crypto.getRandomValues(). | |
| - In Node, you get it from crypto.randomBytes() | |
| Now LOOK AT YOU! You already have secure ways to generate random bytes, |
This file contains hidden or 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 Complex = function(real, imag) { | |
| if (!(this instanceof Complex)) { | |
| return new Complex (real, imag); | |
| } | |
| if (typeof real === "string" && imag == null) { | |
| return Complex.parse (real); | |
| } | |
| this.real = Number(real) || 0; |
This file contains hidden or 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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |