Skip to content

Instantly share code, notes, and snippets.

@Matojeje
Matojeje / LeapYears.js
Created December 14, 2019 11:29
Leap years codegolf - prints all leap years from 1800 to 2400 inclusive
for(i=1800;i<2401;i++){!(i%4)&&(i%100)^!(i%400)?print(i):0}
@Matojeje
Matojeje / FizzBuzz.js
Created December 12, 2019 18:38
FizzBuzz codegolf
for(i=1;i<101;i++){a="";i%3==0?a+="Fizz":0;i%5==0?a+="Buzz":0;print(a||i)}
@Matojeje
Matojeje / gmap.html
Last active March 16, 2018 22:37
Google Maps API TOS
<html>
<head>
<link rel="stylesheet" href="https://developers.google.com/_static/748d82c5d5/css/devsite-google-blue.css">
<link href="https://developers.google.com/maps/styles/common.css" rel="stylesheet" type="text/css">
<style>
h2 {
border-bottom: 0;
font: 20px/28px Roboto, sans-serif;
font-weight: bold;
@Matojeje
Matojeje / GameWindow NumPad move.sb
Created July 5, 2017 21:34
[Small Basic w/ Data Extension] This will move the GameWindow using the numpad - arrows move the window by 10 pixels, [5] centers it and [7] puts it to coords [0,0]. Every second, the code checks if the window is outside the screen, and warps it back in a way so that it's fully visible. It also accounts for the taskbar.
' settings
includeTaskbar = 1
taskbarHeight = 30
gridSize = 10
GameKeyboard.KeyDown = boop
Sub boop
If GameKeyboard.LastKey = "NumPad8" Then 'up
GameWindow.Top = GameWindow.Top - gridSize