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
| # date 2014-11-03 | |
| # A test script to let an LED blink on your RaspberryPi (pin 11). | |
| # | |
| # To use the RPi.GPIO module just install python-rpi.gpio package. | |
| import RPi.GPIO as GPIO | |
| import time | |
| GPIO.setmode(GPIO.BOARD) |
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
| /** | |
| * @author Ikaros Kappler | |
| * @date 2014-12-24 | |
| * @version 1.0.0 | |
| **/ | |
| /** | |
| * This function creates a human-readable date/time string. | |
| * Format: YYYY-MM-DD_H.i.s | |
| **/ |
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
| /** | |
| * A complex math class in rectangular coordinates. | |
| * | |
| * @author Ikaros Kappler | |
| * @date 2017-05-03 | |
| * @modified 2017-05-30 Fixed wrong named 'div' function ('sub' duplicates). | |
| * @version 1.0.1 | |
| **/ | |
| var Complex = (function() { |
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
| /** | |
| * A simple graph class. | |
| * | |
| * @author Ikaros Kappler | |
| * @date 2017-05-30 | |
| * @modified 2017-05-31 Fixed the 'undirected' param and the getConnected function. | |
| * @version 1.0.1 | |
| **/ | |
| var Graph = (function() { |
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
| server { | |
| listen 80; | |
| listen [::]:80 default_server ipv6only=on; | |
| server_name _; | |
| root /usr/share/nginx/www; | |
| index index.php index.html index.htm; | |
| # Deny access to all dotfiles | |
| location ~ /\. { |
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
| /** | |
| * A simple mouse handler for demos. | |
| * Use to avoid load massive libraries like jQuery. | |
| * | |
| * Usage: | |
| * new MouseHandler( document.getElementById('mycanvas') ) | |
| * .drag( function(e) { | |
| * console.log( 'Mouse dragged: ' + JSON.stringify(e) ); | |
| * if( e.params.leftMouse ) ; | |
| * else if( e.params.rightMouse ) ; |
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
| /** | |
| * A simple balanced binary search-tree class I adapted from an implementation | |
| * by https://github.com/mourner. | |
| * | |
| * | |
| * Original implementation (basically a demo/test class) found at | |
| * https://github.com/mourner/bbtree | |
| * | |
| * | |
| * I just added a closure and a utility function to iterate over the set. |
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
| #!/bin/bash | |
| while true; do | |
| read -p "Do you really wish to do this thing? (y/n)? " yn | |
| case $yn in | |
| [Yy]* ) echo "Doing the thing now."; break;; | |
| [Nn]* ) exit;; | |
| * ) echo "Please answer yes or no.";; | |
| esac | |
| done |
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
| // Import your preferred Color class | |
| import { Color } from "./datastructures/Color"; | |
| // A mix of green shades | |
| // Example at https://www.int2byte.de/public/plot-boilerplate/screenshots/screenshots-fullcolor/screenshot-20201027-0-multiple-circle-intersection-malachite.png | |
| export const WebColorsMalachite : Array<Color> = [ | |
| Color.makeRGB(0,21,6), | |
| Color.makeRGB(0,30,12), | |
| Color.makeRGB(0,52,28), | |
| Color.makeRGB(0,81,47), |
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
| // Intend: create a shape with all available SVG path commands. | |
| // Result: two shapes, one with absolute commands only, the second with relative commands only. | |
| // Aim: test my SVG path transform algorithm if it works (scale and translate). | |
| var drawScalingTestPath = function() { | |
| // Define a shape with SVG path data attributes only with _absolute_ | |
| // path commands. | |
| var svgDataAbsolute = [ | |
| 'M', -10, -7.5, | |
| 'V', -10, |
OlderNewer