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
extends CharacterBody2D | |
const floor_move_speed_max: float = 400.0 | |
const floor_move_acceleration: float = 2000 | |
const floor_friction: float = 2000 | |
const jump_min_height: float = 50 | |
const jump_max_height: float = 200 | |
const jump_time_to_apex: float = 0.5 | |
const air_move_speed_max: float = 400.0 |
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
curl -s "https://www.archlinux.org/mirrorlist/?country=DE&protocol=https&ip_version=4&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' > /etc/pacman.d/mirrorlist |
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
def func(event:, context:) | |
nil[] | |
end |
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 bash | |
set -e | |
time="$1" | |
(sleep "$((time * 60))" && terminal-notifier -message "There you go." -title "Hi") & |
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
typeset -F SECONDS start | |
precmd () { | |
start=$SECONDS | |
} | |
zle-line-init () { | |
PREDISPLAY="[$(( $SECONDS - $start ))] " | |
} | |
zle -N zle-line-init |
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 bash | |
cr=`echo $'\n.'` | |
cr=${cr%.} | |
read -p "Do you want to run $*? [N/y]${cr}${cr}" -s -N 1 REPLY | |
if test "$REPLY" = "y" -o "$REPLY" = "Y"; then | |
exec "$@" | |
else |
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 bash | |
# | |
# Download an index of posts from a blogger blog | |
# | |
# Example usage: ./blogger-index techblog.netflix.com | |
# | |
# Dependencies: xml2json, jq | |
set -e |
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
#lang racket | |
(define (to-function format acc) | |
(match format | |
[(list #\% #\d rest ...) (lambda (i) (to-function rest (string-append acc (number->string i))))] | |
[(list #\% #\s rest ...) (lambda (s) (to-function rest (string-append acc s)))] | |
[(cons c rest) (to-function rest (string-append acc (string c)))] | |
[null acc])) | |
(define (printf format) |
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
(def :f (function [:x] { (some-other-function x) } )) | |
(def :collatz (function [:n] { (if (= n 1) | |
{ (cons 1 nil) } | |
{ (cons n | |
(if (even? n) | |
{ (collatz (/ n 2)) } | |
{ (collatz (+ (* 3 n) 1)) } )) } ) | |
} )) | |
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
(define check-equal? 1) | |
(require rackunit) |