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/env python | |
# H | M*10 | M | |
# 1 5 9 | 1 5 | 1 5 9 | |
# 2 6 10 | 2 | 2 6 | |
# 3 7 11 | 3 | 3 7 | |
# 4 8 12 | 4 | 4 8 | |
import time | |
import unicornhat as unicorn |
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
<?php | |
/* I use this to quickly preview last taken screenshot on my retina ipad. | |
* (I use xip.io to quickly access virtual hosts on my dev machine.) | |
* | |
* Be sure to allow write in the dir where this script is located. | |
* | |
* It's possible to change the directory where screenshots are stored on mac. | |
* Consider using one exclusively for this purpose | |
* (see google.com/search?q=change+screenshot+location+mac). |
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/env python | |
# Explorer HAT/pHAT https://shop.pimoroni.com/search?type=product&q=explorer+hat | |
# STS-Pi https://shop.pimoroni.com/products/sts-pi | |
import time | |
import explorerhat | |
speed = 100 |
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/python | |
import atexit | |
import re | |
import socket | |
import subprocess | |
import time | |
import os | |
import sys | |
from datetime import datetime |
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
#!/bin/bash | |
# $ npm run build | |
# $ sh /path/to/this/script/sdrm.sh ./book "John Doe" | |
DIR=$1 | |
NAME=$2 | |
LICENSE="Licencováno k užívání dle poskytnuté licence čtenáři <i>$NAME</i>." | |
PLACEHOLDER='<section id="social-drm-placeholder"></section>' | |
REPLACEMENT='<section id="social-drm">'$LICENSE'</section>' |
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
backend: | |
name: git-gateway | |
branch: master | |
media_folder: static/media | |
public_folder: /media | |
display_url: "https://pasporty.netlify.com" | |
slug: | |
encoding: ascii | |
clean_accents: true | |
collections: |
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
/* correct quotes in various languages */ | |
@mixin quotes($langs, $open, $close) { | |
@each $lang in $langs { | |
[lang="#{$lang}"] { | |
q::before { content: $open; } | |
q::after { content: $close; } | |
} | |
} | |
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
{{ $page := .Page }} | |
{{ range .pages }} | |
{{ $alpha := "aábcčdďeéěfgh#iíjklmnňoópqrřsštťuúůvwxyýzž" }} | |
{{ $title := substr (.Title | lower | replaceRE "ch" "#" | replaceRE (print "[^" $alpha "]") "") 0 40 }} | |
{{ $sortStr := split $title "" }} | |
{{ $len := len $sortStr }} | |
{{ $score := math.Pow 100 42 }} |
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
local function vectorFromAngle(magnitude, angle) | |
angle = (angle + 90) % 360 | |
local rad = math.rad(angle) | |
local x = magnitude * math.cos(rad) | |
local y = magnitude * math.sin(rad) | |
return v2D.new(x, y) | |
end | |
Maze = {} | |
class("Maze").extends(NobleScene) |
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
local addScore <const> = playdate.scoreboards.addScore | |
local getScores <const> = playdate.scoreboards.getScores | |
local scoreboardsState <const> = State.scoreboards -- default state is an empty table {} | |
local boards = { | |
{ | |
id = "score", | |
name = "High Scores", | |
}, | |
-- ... |