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
import java.util.* | |
import kotlin.math.sqrt | |
abstract class Point(val x: Int, val y: Int) { | |
abstract fun distanceToO(): Double | |
fun closerToO(p: Point) = distanceToO() < p.distanceToO() | |
fun minus(p: Point) = CartesianPt(x - p.x, y - p.y) | |
} | |
open class CartesianPt(x: Int, y: Int) : Point(x, y) { |
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
function _init() | |
cls() | |
ball_x = 10 | |
ball_dx = 2 | |
ball_y = 20 | |
ball_dy = 2 | |
ball_r = 2 | |
pad_x = 52 | |
pad_y = 120 |
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
[38;5;255m,_ ,_==▄▂[0m | |
[38;5;255m, ▂▃▄▄▅▅[48;5;240m▅[48;5;20m▂[48;5;240m▅¾[0m. [38;5;199m/ [38;5;20m/[0m | |
[38;5;255m[48;5;20m▄[0m[38;5;255m[48;5;199m▆[38;5;16m[48;5;255m<´ [38;5;32m"[38;5;34m»[38;5;255m▓▓[48;5;32m▓[48;5;240m%[0m\ [38;5;199m/ [38;5;20m/ [38;5;45m/ [38;5;118m/[0m | |
[38;5;255m,[38;5;255m[48;5;240m▅[38;5;16m[48;5;255m7" [38;5;160m´[38;5;34m>[38;5;255m[48;5;39m▓▓[38;5;199m[48;5;255m▓[0m[38;5;255m% [38;5;20m/ [38;5;118m/ [38;5;199m> [38;5;118m/ [38;5;199m>[38;5;255m/[38;5;45m%[0m | |
[38;5;255m▐[48;5;240m[38;5;255m¶[48;5;240m[38;5;255m▓[48;5;255m [38;5;196m,[38;5;34m»[48;5;201m[38;5;255m▓▓[0m[38;5;255m¾´[0m [38;5;199m/[38;5;255m> %[38;5;199m/[38;5;118m%[38;5;255m/[38;5;199m/ [38;5;45m/ [38;5;199m/[0m | |
[38;5;255m[48;5;240m▓[48;5;255m[38;5;16m▃[48;5;16m[38;5;255m▅▅[38;5;16m[48;5;255m |
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
''' | |
Circuitous, LLC - | |
An Advanced Circle Analytics Company | |
Summary: Toolset for New-Style Classes | |
1. Inherit from object. | |
2. Instance variables for information unique to an instance. | |
3. Class variables for data shared among all instances. | |
4. Regular methods need "self" to operate on instance data. |
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
(function (global, $) { | |
// Saves the user from typing the new keyword | |
var Greeter = function (firstname, lastname, language) { | |
return new Greeter.init(firstname, lastname, language); | |
}; | |
var supportedLangs = ['en', 'es']; | |
var greetings = { | |
en: 'Hello', |
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 ruby | |
# This pre-commit hook will prevent any commit with the work "hacking" | |
# Put this file in your local repo, in the .git/hooks folder | |
# and make sure it is executable. | |
# The name of the file *must* be "pre-commit" for Git to pick it up. | |
def current_branch() | |
branches = `git branch --no-color`.split(/\n/) | |
current = branches.select{ |b| b =~ /\s*\*/ }.first |
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
fpath=(~/config/zsh/functions $fpath) | |
autoload -U compinit && compinit | |
## Command history configuration | |
HISTFILE=$HOME/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
setopt append_history | |
setopt extended_history |