I hereby claim:
- I am raphaeltraviss on github.
- I am rtraviss (https://keybase.io/rtraviss) on keybase.
- I have a public key ASCJ-rgURfxuDoJ4XXWn006b4ADRsqLOkbyQBspwcSHWeQo
To claim this, I am signing this object:
| <?php | |
| class DateIntervalEnhanced extends DateInterval { | |
| /* Keep in mind that a year is seen in this class as 365 days, and a month is seen as 30 days. | |
| It is not possible to calculate how many days are in a given year or month without a point of | |
| reference in time.*/ | |
| public function to_seconds() { | |
| return ($this->y * 365 * 24 * 60 * 60) + | |
| ($this->m * 30 * 24 * 60 * 60) + | |
| ($this->d * 24 * 60 * 60) + |
| import AppKit | |
| import QuartzCore | |
| import PlaygroundSupport | |
| // Parameters that define the style | |
| let hexSideLength: CGFloat = 15.0 | |
| let hexLineWidth: CGFloat = 3.0 | |
| let colors = [NSColor.red, NSColor.cyan, NSColor.green, NSColor.yellow, NSColor.red].map { $0.cgColor } |
| import AppKit | |
| // This class will manufacture a datasource object for use with NSOutlineView, | |
| // given the following: | |
| // - A type, specifying what type of object the datasource will provide. | |
| // - A root object, which contains the heirarchy of its children | |
| // - A function that can be called on the object type, to return its children. | |
| // - A function that can be called on the object type, to return its identity. | |
| // - A pasteboard type that can be used for drag and drop. | |
| // - Side effects for insert and move actions. |
| import AppKit | |
| // This class will manufacture a delegate object for use with NSOutlineView, | |
| // given the following: | |
| // - A setup function, that will take an NSTableViewCell or subclass of the | |
| // given type, and fill in its views. | |
| // - A cell identifier from the storyboard, associated to the outline view. | |
| // - A function that is called when a selection is made... | |
| // Since the selection handler doesn't actually provide the selected node, | |
| // you need to seal a reference to your outline view inside your Selection |
| import Foundation | |
| import UIImageColors | |
| import Haneke | |
| extension UIImageColors : DataConvertible, DataRepresentable { | |
| public typealias Result = UIImageColors | |
| public static func convertFromData(_ data: Data) -> Result? { | |
| let representation = NSKeyedUnarchiver.unarchiveObject(with: data) as? [String: Data] | |
| guard let colorData = representation else { return nil } |
| import { assign, interpret, Machine, Interpreter, EventObject } from 'xstate'; | |
| // Phaser implicitly available | |
| interface PawnContext { | |
| moveTowards?: Phaser.Math.Vector2, | |
| } |
I hereby claim:
To claim this, I am signing this object:
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| # add command and project completion to tmuxinator | |
| # add custom file path completion to your specific “my_project” project | |
| # use this inside a ~/.tmuxinator/my_project.yml via <%= @args[0] %> | |
| # e.g. set the root project path via ```root: <%= @args[0] %>``` | |
| #compdef _tmuxinator tmuxinator | |
| _tmuxinator() { | |
| local commands projects | |
| commands=(${(f)"$(tmuxinator commands zsh)"}) |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |