Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
require 'xcodeproj'
# ============================================
# !!! I've released a ruby gem that does the same thing, but better.
# You can install it by running `gem install xcprovisioner` or
# `sudo gem install xcprovisioner` if it asks for sudo rights.
#
# For more info: https://github.com/thelvis4/XCProvisioner
@nsleader
nsleader / universal-framework.sh
Created October 26, 2016 11:19 — forked from cromanderrr/universal-framework.sh
This run script will build the iphoneos and iphonesimulator schemes and then combine them into a single framework using the lipo tool (including all the Swift module architectures).
#!/bin/sh
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
@nsleader
nsleader / manifest.plist
Created May 24, 2016 11:28 — forked from hramos/manifest.plist
Sample manifest file for Over The Air iOS deployment
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
@nsleader
nsleader / 0 run PerfectLib(FastCGI) with nginx.md
Created May 23, 2016 20:33 — forked from groovelab/0 run PerfectLib(FastCGI) with nginx.md
PerfectのExampleをFastCGIでnginxから動かす
@nsleader
nsleader / OSXRoamingKnobs
Created May 11, 2016 07:57 — forked from donalod/OSXRoamingKnobs
OSXRoamingKnobs
# Via @srynearson tweet https://twitter.com/Srynearson/status/534421250261942272 #kudos Bill Mullady
# Re: http://community.arubanetworks.com/t5/Unified-Wired-Wireless-Access/Mac-OS-X-Lion-MacBook-Air-issue/m-p/113885#M24396
sudo defaults read /Library/Preferences/com.apple.airport.opproam
Password:
{
deltaRSSI = 10;
disabled = 0;
useBonjour = 0;
useBroadcastBSSID = 1;
//
// NSOperationQueue+Completion.h
// QueueTest
//
// Created by Artem Stepanenko on 23.11.13.
// Copyright (c) 2013 Artem Stepanenko. All rights reserved.
//
typedef void (^NSOperationQueueCompletion) (void);
float *calcAkimaSpline(int initialX[], float initialY[], uint n, int step, int minX, int maxX) {
if (n <= 2) {
NSLog(@"error spline");
return malloc(sizeof(float));
} else {
n += 4;
int x[n];
float y[n];
x[0] = initialX[0];