This file contains hidden or 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
#!/bin/bash | |
# Wrapper script for git mergetool | |
# This requires the .gitconfig file to have: | |
# - mergetool entry for "unityyamlmerge"; | |
# - mergetool entry for "p4mergetool"; | |
# These merge tool entries must both specify the | |
# cmd field. The command to call this script: | |
# [mergetool "merge_wrapper"] | |
# cmd = $HOME/merge-wrapper \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" | |
# Locate this script in your $HOME |
This file contains hidden or 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
# usage: Add this file to your home dir, then add `source ~/aliases.sh` to your .bashrc file | |
# git aliases: | |
alias g="git" | |
alias gs="git status" | |
alias gc="git commit" | |
alias gcm="git commit -m" | |
alias gl="git log --oneline --graph --decorate --all --abbrev-commit" | |
alias gp="git push" |
This file contains hidden or 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
// Modified version of SMB's pitch shift to use the algorithm described in | |
// Nicolas Juillerat & Beat Hirsbrunner's 2010 paper "LOW LATENCY AUDIO PITCH | |
// SHIFTING IN THE FREQUENCY DOMAIN". | |
#include <string.h> | |
#include <math.h> | |
#include <stdio.h> | |
#include <Accelerate/Accelerate.h> |
This file contains hidden or 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 Foundation | |
public struct Matrix<Scalar: CustomStringConvertible> { | |
public let width: Int | |
public let height: Int | |
public var grid: [Scalar] | |
} | |
// MARK: - Creating matrices |
This file contains hidden or 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
// | |
// Audiobus.swift | |
// AudioKit | |
// | |
// Created by Daniel Clelland on 2/06/16. | |
// Updated for AudioKit 3 by Aurelius Prochazka. | |
// | |
// Copyright © 2016 AudioKit. All rights reserved. | |
// |
This file contains hidden or 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
X = 'X' | |
O = 'O' | |
theBoard = [[None for _ in range(3)] for _ in range(3)] | |
def owner(line): | |
return reduce(lambda acc,cur: acc if acc == cur else None, line, line[0]) | |
def diags(board): | |
return [[x[i] for i, x in enumerate(board)], | |
[x[i] for i, x in enumerate(reversed(board))]] |