Skip to content

Instantly share code, notes, and snippets.

Avatar
🍊
workin' goodly

Gianni Chiappetta gf3

🍊
workin' goodly
View GitHub Profile
@Krever
Krever / _README.md
Last active Oct 12, 2021
Yabai setup for i3wm users
View _README.md
View app-bridge-polaris-ideas.tsx
// in @shopify/polaris-adapter
enum Action {
Replace,
Augment,
Ignore,
}
type Behavior<Props> =
| {action: Action.Ignore}
| {
@nicholasknight
nicholasknight / adv2notes.md
Last active Mar 23, 2021
Kinesis Advantage 2 notes
View adv2notes.md

(NOTE: Current and future versions of this and any other Advantage 2-related things I post will be at https://github.com/nicholasknight/adv2keyboard)

I received my Advantage 2 today. There's no full manual yet, even though keyboards are apparently arriving (hint, hint, Kinesis). The quick start guide leaves out the "power user mode", and there are some other quirks.

Update: A manual has been posted at http://www.kinesis-ergo.com/advantage2-resources/

It includes a dictionary for the key maps, but I know it leaves at least one possible key undocumented: it does not list f14, but I have successfully mapped my scrollock to f14 regardless.

It also mentions a firmware version (1.0.18) that doesn't seem to be available yet, with a new feature (status report playback speed).

@raphaelhanneken
raphaelhanneken / DragAndDropImageView.swift
Last active Apr 30, 2021
NSImageView with drag and drop capabilities written in Swift.
View DragAndDropImageView.swift
//
// DragAndDropImageView.swift
// Iconizer
// https://github.com/raphaelhanneken/iconizer
//
import Cocoa
class DragDropImageView: NSImageView, NSDraggingSource {
/// Holds the last mouse down event, to track the drag distance.
@bjhomer
bjhomer / currentTrack.swift
Last active Jul 1, 2021
Using ScriptingBridge from Swift.
View currentTrack.swift
#! /usr/bin/swift
import ScriptingBridge
@objc protocol iTunesTrack {
optional var name: String {get}
optional var album: String {get}
}
@objc protocol iTunesApplication {
@higepon
higepon / API.swift
Last active Sep 27, 2021
An example of JSON API call in Swift
View API.swift
//
// API.swift
//
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
//
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
@kristopherjohnson
kristopherjohnson / pipe-forward.swift
Last active Jan 21, 2020
Swift: define F#-style pipe-forward (|>) operator that evaluates from left to right.
View pipe-forward.swift
// F#'s "pipe-forward" |> operator
//
// Also "Optional-chaining" operators |>! and |>&
//
// And adapters for standard library map/filter/sorted
infix operator |> { precedence 50 associativity left }
infix operator |>! { precedence 50 associativity left }
infix operator |>& { precedence 50 associativity left }
infix operator |>* { precedence 50 associativity left }
View NaturalMotion.swift
//
// NaturalMotion.swift
//
// Created by Maciej Swic on 2014-06-06.
// Released under the MIT license.
//
import UIKit
extension UIView {
@danielsz
danielsz / pushState.cljs
Last active Jul 15, 2016
PushState (via Html5History from google closure) with secretary, a client-side routing library for clojurescript. Allows to map absolute urls with routes without the hash-bang hackery.
View pushState.cljs
(def history (Html5History.))
(.setUseFragment history false)
(.setPathPrefix history "")
(.setEnabled history true)
(let [navigation (listen history EventType/NAVIGATE)]
(go
(while true
(let [token (.-token (<! navigation))]
(secretary/dispatch! token)))))
@canton7
canton7 / 0main.md
Created Sep 17, 2012
Git Bisect and Feature Branches
View 0main.md

Git Bisect and Feature Branches

There are people out there who claim that merge-based workflows (that is, workflows which contain non-fast-forward merges) are bad. They claim that git bisect gets confused by merge-based workflows, and instead advocate rebase-based workflows without explicit feature branches.

They're wrong.

Furthermore, the "advantages" of their workflows are in fact disadvantages. Let me show you.