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
#!/bin/sh | |
if [ ! -f AddressBook-v22.abcddb ]; then | |
echo "Hmm, pleace cd to the dir which has AddressBook-v22.abcddb." | |
exit 1; | |
fi | |
find Images -type f|sed 's/^Images\///g'|sort > images_ids | |
echo "SELECT ZUNIQUEID FROM ZABCDRECORD;"|sqlite3 AddressBook-v22.abcddb|grep ABPerson|awk -F: '{print $1}'|sort > real_ids |
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
#!/bin/sh | |
__CF_USER_TEXT_ENCODING=`printf '0x%X' \`id -u\``:0x8000100:14 | |
pbpaste|pbcopy |
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
#!/bin/sh | |
if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then | |
echo "Usage: $0 private_key.p12 certificate.{p12, der}" | |
echo "You can export the private key (and certificate) in PKCS12 format from Keychain.app." | |
exit 0 | |
fi | |
# Create private key in PEM format from PKCS12 format without password. | |
openssl pkcs12 -in "$1" -nocerts -nodes -out _key.pem |
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
#!/usr/bin/env ruby | |
require 'csv' | |
require 'net/smtp' | |
require 'resolv' | |
# We need a specific version of eventmachine due to apply a patch. | |
gem 'eventmachine', '0.12.10' | |
require 'eventmachine' |
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
#import <Cocoa/Cocoa.h> | |
@interface StripColorSyncProfile : NSObject | |
+ (NSData *)imageDataWithoutColorSyncProfile:(NSData *)data; | |
@end | |
@implementation StripColorSyncProfile | |
+ (NSData *)imageDataWithoutColorSyncProfile:(NSData *)data | |
{ | |
CGImageSourceRef cf_sourceImage = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); |
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
1. GmailをSafariで開く | |
2. 次の行をjavascript:から最後までコピーしてアドレスバーに貼り付けてGo | |
javascript:(function()%7Bvar%20d=document,m=d.createElement('meta');m.name='apple-mobile-web-app-capable';m.content='yes';d.getElementsByTagName('head').item(0).appendChild(m);alert('Ready.');%7D)(); | |
3. その後+ボタンでホーム画面に追加 | |
4. Gmailが独立したアプリになる | |
5. 便利 |
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
#!/bin/sh | |
if [ "$1" = "-h" -o "$1" = "--help" ]; then | |
echo "Usage: freeze_webkit_for_app.sh [path]" | |
echo "ARGUMENTS" | |
echo " path Path to the application." | |
echo "OPTIONS" | |
echo " APPLICATION_PATH Path to the application." | |
echo " WEBKIT_REVISION Revision of WebKit framework nightly build." | |
exit 1 |
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 (C) 2012 Yoshimasa Niwa | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
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
set APPLE_ID to "YOUR APPLE ID" | |
set APPLE_ID_PASSWORD to "YOUR APPLE ID PASSWORD" | |
tell application "iTunes" to activate | |
tell application "System Events" | |
tell process "iTunes" | |
set itunes to it | |
-- Make sure iTunes is ready | |
if title of window 1 is not equal to "iTunes" then |
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
#import <PreferencePanes/PreferencePanes.h> | |
#import <objc/message.h> | |
void exchangeInstanceMethodImplementations(NSString *className, SEL originlSelector, SEL replacementSelector) | |
{ | |
Class class = NSClassFromString(className); | |
if(class) { | |
Method originalMethod = class_getInstanceMethod(class, originlSelector); | |
Method replacementMethod = class_getInstanceMethod(class, replacementSelector); | |
method_exchangeImplementations(originalMethod, replacementMethod); |