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
(* | |
@author: Slipp Douglas Thompson | |
@purpose: Pauses Spotify after the current song finishes playing. | |
@todo: Optimize so it's more efficient. | |
@usage: Drop a compiled script (a .scpt file, converted with AppleScript Editor if this is a .applescript file) into ~/Library/Scripts/Applications/Spotify. | |
Ensure than “Show Script menu in menu bar” is enabled (which can be found in the AppleScript Editor preferences). | |
When playing a song in Spotify and wishing to stop the music when the track finished, choose “When Song Finishes, Pause” from the script menu, and then walk, walk away. | |
*) | |
tell application "Spotify" | |
log "“When Song Finishes, Pause”: player state is " & (player state) |
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
// Copyright 2005, Google Inc. | |
// All rights reserved. | |
// | |
// This is an extract if googles unit test framework to get the AlmostEquals | |
// functionaliy for floats | |
// see https://github.com/google/googletest/blob/eabd5c908d27eed925d81637c99c834489fc84b2/googletest/include/gtest/internal/gtest-internal.h | |
#pragma once | |
namespace testing { |
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
static class Extensions | |
{ | |
public static T FirstOrValue<T>(this IEnumerable<T> sequence, T value) | |
{ | |
T result = value; | |
foreach(T item in sequence) | |
{ | |
result = item; | |
break; | |
} |
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
public static class Dev | |
{ | |
public static void Null(object val) | |
{ | |
if (val == null) | |
{ | |
throw new InvalidOperationException(); | |
} | |
} | |
} |
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
template <int Val> | |
struct int_const : std::integral_constant<int, Val> {}; | |
template <typename In, typename T> | |
struct getMappedOutput; | |
template <typename In, typename Left, typename Right, typename ...Tail> | |
struct getMappedOutput<In, std::tuple<Left, Right, Tail...>> | |
: getMappedOutput<In, std::tuple<Tail...>> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform> | |
<ProjectGuid>{A83510D8-7AED-411E-9616-DCFEA180969E}</ProjectGuid> | |
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | |
<OutputType>Library</OutputType> | |
<Description>cocos2d for MonoTouch</Description> | |
<RootNamespace>Cocos2D</RootNamespace> |
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
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace Scratch | |
{ | |
public class Program | |
{ | |
public static void Main(string[] pArgs) |