Skip to content

Instantly share code, notes, and snippets.

View ricobeck's full-sized avatar
🏢
Working from office like an animal

Rico Becker ricobeck

🏢
Working from office like an animal
View GitHub Profile
@ricobeck
ricobeck / Shaker.swift
Created April 1, 2024 20:10
Detecting shake of playdate device
//
// Shaker.swift
//
//
// Created by Rico Becker on 30.03.24.
//
import PlaydateKit
struct Shaker {
let gravity: Float = 9.80665
import Foundation
// # Structure
// - SwiftPackage
// - Sources
// - Tests
// - Resources
// - test.txt
// - SwiftPackageTests
// - SwiftPackageTests.swift
Pod::Spec.new do |spec|
spec.name = "R.swift.Library"
spec.version = "5.0.0.alpha.2"
spec.license = "MIT"
spec.summary = "Companion library for R.swift, featuring types used to type resources"
spec.description = <<-DESC
This library contains types used by the `R.generated.swift` file that is normally generated by R.swift. R.swift depends on this pod to include some types and other libraries can use this project to extend R.swift types.
R.swift is a tool to get strong typed, autocompleted resources like images, fonts and segues in Swift projects.
Pod::Spec.new do |spec|
spec.name = "R.swift"
spec.version = "5.0.0.alpha.2"
spec.license = "MIT"
spec.summary = "Get strong typed, autocompleted resources like images, fonts and segues in Swift projects"
spec.description = <<-DESC
R.swift is a tool to get strong typed, autocompleted resources like images, fonts and segues in Swift projects.
Pod::Spec.new do |s|
s.name = "Sparkle"
s.version = "0.1.0"
s.summary = "A software update framework for the Mac"
s.description = <<-DESC
Sparkle is an easy-to-use software update framework for Cocoa developers.
* True self-updating--no work required from the user.
* Displays release notes to the user via WebKit.
* Displays a detailed progress window to the user.
@ricobeck
ricobeck / gist:7535126
Last active December 28, 2015 17:19
repl and spaces contained in path
Zairnd:~ rick$ pod ipc repl
version: '0.28.0'
spec /Users/rick/.cocoapods/repos/master/Grand Object Dispatch/0.5.0/Grand Object Dispatch.podspec
[!] No podspec exists at path `/Users/rick/.cocoapods/repos/master/Grand`.
@ricobeck
ricobeck / gist:7467266
Last active December 28, 2015 07:49
NSTask pod version
- (void)checkCocoaPodsVersion
{
NSTask *task = [[NSTask alloc] init];
NSPipe *output = [NSPipe pipe];
output.fileHandleForReading.readabilityHandler = ^ (NSFileHandle *fileHandle)
{
NSData *data = [fileHandle availableData];
NSLog(@"read: %@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
};
@ricobeck
ricobeck / gist:7456769
Created November 13, 2013 21:31
Getting the CocoaPods version with DSUnixTask - output is empty.
- (void)checkCocoaPodsVersion
{
DSUnixShellTask *task = [DSUnixTaskSubProcessManager shellTask];
[[DSUnixTaskSubProcessManager sharedManager] setLoggingEnabled:YES];
[task setCommand:@"pod"];
[task setArguments:@[@"--version"]];
[task setStandardErrorHandler:^(DSUnixTask *task, NSString *error)
{
NSLog(@"DSUnixTask error: %@", error);
@ricobeck
ricobeck / gist:7371887
Created November 8, 2013 14:37
Build Version Script Phase
buildNumber=`expr $(git rev-list HEAD | wc -l) + 1`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Pod::Spec.new do |s|
s.name = "OpenWeatherMapAPI"
s.version = "0.0.5"
s.summary = "A simple api for getting data from http://openweathermap.org."
s.homepage = "https://github.com/ricobeck/OpenWeatherMapAPI.git"
s.license = { :type => 'MIT', :file => 'LICENSE'}
s.author = { "Adrian Bak" => "valinorsgatekeeper@gmail.com" }
s.ios.deployment_target = "5.1"
s.osx.deployment_target = "10.7"
s.source = { :git => "https://github.com/ricobeck/OpenWeatherMapAPI.git", :tag => s.version.to_s }