Skip to content

Instantly share code, notes, and snippets.

@tal
tal / BaseStackView.swift
Created July 22, 2022 00:54
A basic implementation of a stack of cards tied to a model.
//
// BaseStackView.swift
// Sport Range
//
// Created by Tal Atlas on 7/20/22.
//
import SwiftUI
class NavStack: ObservableObject {
module Skype
extend self
GROUPS = {
:city => '#bennygilt/$f5558ce446c1793f',
:city_announcements => '#swimming_bird/$877f4e5a36f23a8d'
}
def invoke cmd, name
oas = ['osascript']
oas << %q{-e 'tell application "Skype"'}
@tal
tal / fu.rb
Created September 21, 2011 20:13
Ruby Fu
class Foo
def t
puts "Foo"
end
end
module T
def t
puts "T"
super
{
"features": {
"my_feature": false,
"other_feature": true
},
"experiments": {
"likes_are_boops": "control-likes",
"dashboard_sideways": "sideways-1"
}
}
@tal
tal / hlall.lua
Created February 4, 2013 17:45
Returns a hash of arrays with the key being everything that `*` matches and the value being the contents of the list
local keys = redis.call('keys',KEY[1])
local ret = {}
for i,key in ipairs(keys) do
local keyname = key:sub(1,-2)
local members = redis.call('lrange', key,0 ,-1)
ret[i] = {keyname, members}
#compdef hub
# Zsh will source this file when attempting to autoload the "_hub" function,
# typically on the first attempt to complete the hub command. We define two new
# setup helper routines (one for the zsh-distributed version, one for the
# git-distributed, bash-based version). Then we redefine the "_hub" function to
# call "_git" after some other interception.
#
# This is pretty fragile, if you think about it. Any number of implementation
# changes in the "_git" scripts could cause problems down the road. It would be
# fixme - the load process here seems a bit bizarre
zmodload -i zsh/complist
WORDCHARS=''
unsetopt menu_complete # do not autoselect the first completion entry
unsetopt flowcontrol
setopt auto_menu # show completion menu on successive tab press
setopt complete_in_word
setopt always_to_end
@tal
tal / actions.swift
Last active June 29, 2016 04:06
Redux swift example
import Foundation
struct DashResponse {}
enum AppActions {
case dashAction(DashActions)
case envAction(EnvActions)
}
enum DashActions {

Keybase proof

I hereby claim:

  • I am tal on github.
  • I am tal (https://keybase.io/tal) on keybase.
  • I have a public key whose fingerprint is BE5E 1663 DA9A 13AA D4E8 3AFC C639 B882 E874 41AE

To claim this, I am signing this object:

(function() {
'use strict';
var once = 0;
window.BananaStand = function BananaStand() {
this.middleware = Array.prototype.slice.call(arguments);;
};
var locStorInterface = {