Skip to content

Instantly share code, notes, and snippets.

Count: 12
/Users/Stanislaw/Work/MusicContent/Music Content/3 Doors Down/Be Like That/3 Doors Down - Be Like That - Finale.xml
Document has errors: Errors: (
"Error type: "More than one note on the same string in a chord!", description: "Voicing at measure 36 contains two notes on the same string: (
"<MXMLNote: 0x7fd96174e7e0 (type = B; alteration = No; string = 5; fret = 2)>",
"<MXMLNote: 0x7fd96174f540 (type = D; alteration = No; string = 5; fret = 5)>",
"<MXMLNote: 0x7fd961750240 (type = D; alteration = No; string = 4; fret = 0)>",
"<MXMLNote: 0x7fd961750f80 (type = A; alteration = No; string = 3; fret = 2)>",
"<MXMLNote: 0x7fd962977690 (type = B; alteration = No; string = 2; fret = 0)>",
"<MXMLNote: 0x7fd9629783f0 (type = F; alteration = #; string = 1; fret = 2)>"
@stanislaw
stanislaw / copy_frameworks_debug.sh
Created August 28, 2016 13:51
Proof of concept: Carthage with rsync
#!/bin/bash
# This script is an optimization over Carthage's copy-frameworks script.
# This script copies frameworks provided as "Input Files" in
# Xcode Run Script phase. On the first run it copies the frameworks and
# codesigns them, on subsequent runs it does nothing.
#
# Warning! This optimization has a cost: to upgrade a particular framework
# one has to either delete the whole build cache or
# manually delete that framework from cache.
```
width=`identify -format %w icon-167_360.png`; \
convert -background white -fill black -gravity center -size ${width}x30 \
caption:"Debug" \
icon-167_360.png +swap -gravity south -composite icon-167_360.png
```
@stanislaw
stanislaw / States-v2.md
Created July 28, 2016 19:16 — forked from andymatuschak/States-v3.md
A composable pattern for pure state machines with effects (draft v2)

A composable pattern for pure state machines with effects

State machines are everywhere in interactive systems, but they're rarely defined clearly and explicitly. Given some big blob of code including implicit state machines, which transitions are possible and under what conditions? What effects take place on what transitions?

There are existing design patterns for state machines, but all the patterns I've seen complect side effects with the structure of the state machine itself. Instances of these patterns are difficult to test without mocking, and they end up with more dependencies. Worse, the classic patterns compose poorly: hierarchical state machines are typically not straightforward extensions. The functional programming world has solutions, but they don't transpose neatly enough to be broadly usable in mainstream languages.

Here I present a composable pattern for pure state machiness with effects,

@stanislaw
stanislaw / ddd.md
Created June 27, 2016 19:56 — forked from zsup/ddd.md
Documentation-Driven Development (DDD)

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.
@stanislaw
stanislaw / build-report.groovy
Created June 10, 2016 10:07 — forked from x-cray/build-report.groovy
Jenkins email-ext plugin groovy template. Generates build report. Based on http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/
<!DOCTYPE html>
<head>
<title>Build report</title>
<style type="text/css">
body
{
margin: 0px;
padding: 15px;
}
@stanislaw
stanislaw / TriangleType.swift
Last active July 28, 2017 15:54
Test Triangle Type (exercise from Kent Beck's "Test-Driven Development by Example")
//
// TriangleTest.swift
// TriangleTest
//
// Created by Stanislaw Pankevich on 24/01/16.
// Copyright © 2016 Stanislaw Pankevich. All rights reserved.
//
import XCTest
@stanislaw
stanislaw / utf8.c
Created November 19, 2015 23:09
Some C functions to work with UTF-8 string : you can check if a string is valid UTF-8, get the length of a UTF-8 string and replace things in a UTF-8 string. All `char *` arguments must be regular, null-byte terminated, C strings. I've tried to optimize the best I could. I'd be grateful for any suggestions or improvements. Please note I have onl…
//
// utf8.c
// training
//
// Created by Conrad Kleinespel on 5/27/13.
// Copyright (c) 2013 Conrad Kleinespel. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
NAME=AFNetworking
VERSION=2.5.4
GH_REPO=AFNetworking/AFNetworking
### Paths
COMPONENTS_CACHE_PATH ?= $HOME/Library/Caches/Ports
COMPONENT_CACHE_PATH=$(COMPONENTS_CACHE_PATH)/$(NAME)
COMPONENT_SOURCE_PATH=$(COMPONENT_CACHE_PATH)/$(NAME)-${VERSION}
ZIPBALL_PATH=$(COMPONENT_CACHE_PATH)/$(NAME)-$(VERSION).zip
//
// COBasicSequence.m
// DevelopmentApp
//
// Created by Stanislaw Pankevich on 24/10/15.
// Copyright © 2015 Stanislaw Pankevich. All rights reserved.
//
#import "Sequence.h"
#import <CompositeOperations/COSimpleOperation.h>