This file contains 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
/* Expanded form of a bookmarklet for extracting rev=canonical OR tinyurling a page */ | |
(function(){ | |
var url=document.location; | |
var links=document.getElementsByTagName('link'); | |
var found=0; | |
for(var i = 0, l; l = links[i]; i++) { | |
if (l.getAttribute('rev') == 'canonical' || (/alternate short/).exec(l.getAttribute('rel'))) { | |
found=l.getAttribute('href'); | |
break; | |
} |
This file contains 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
// | |
// BinaryDataScanner.m | |
// | |
// Copyright 2009 Dave Peck <davepeck [at] davepeck [dot] org>. All rights reserved. | |
// http://davepeck.org/ | |
// | |
// This class makes it quite a bit easier to read sequential binary files in Objective-C. | |
// | |
// This code is released under the BSD license. If you use it in your product, please | |
// let me know and, if possible, please put me in your credits. |
This file contains 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
// | |
// NSObject+BlockObservation.h | |
// Version 1.0 | |
// | |
// Andy Matuschak | |
// [email protected] | |
// Public domain because I love you. Let me know how you use it. | |
// | |
#import <Cocoa/Cocoa.h> |
This file contains 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
/* | |
smtpd.js is SMTP server written for node.js | |
MIT License | |
*/ | |
var tcp = require('tcp'); | |
var sys = require('sys'); |
This file contains 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/sh | |
# This program has two feature. | |
# | |
# 1. Create a disk image on RAM. | |
# 2. Mount that disk image. | |
# | |
# Usage: | |
# $0 <dir> <size> | |
# |
This file contains 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
var dgram = require('dgram'); // dgram is UDP | |
// Listen for responses | |
function listen(port) { | |
var server = dgram.createSocket("udp4"); | |
server.on("message", function (msg, rinfo) { | |
console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port); | |
}); |
This file contains 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/Foundation.h> | |
// .h file | |
struct MyConstantsStruct | |
{ | |
NSString *foo; | |
NSString *bar; |
This file contains 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
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
This file contains 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 | |
# | |
# (Above line comes out when placing in Xcode scheme) | |
# | |
API_TOKEN=<TestFlight API token here> | |
TEAM_TOKEN=<TestFlight team token here> | |
SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
#LOG="/tmp/testflight.log" |
This file contains 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
- Copy the delivered ipa into a directory to work in. | |
- export PlistBuddy="/usr/libexec/PlistBuddy" to get the PlistBuddy tool to your shell. If it is not added, all references to PlistBuddy | |
will need to be written as the full path. | |
- Take the delivered App.ipa and unzip it using the unzip command. This should produce a Payload directory containing the app and its | |
resources. | |
- Enter the command "codesign -d --entitlements :enterprise.plist Payload/PathToApp.app/" This pulls the entitlements out of the app, and | |
prints them to a plist, without a leading "blob" of data. Pay particular attention to the colon before the enterprise.plist file name. |
OlderNewer