-
open /private/etc/apache2/httpd.conf file and enable module
uncomment: LoadModule php5_module libexec/apache2/libphp5.so
-
copy /private/etc/php.ini.default to /private/etc/php
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
$ openssl x509 -in aps_cert_development.cer -inform DER -outform PEM -out aps_cert_development.pem | |
$ openssl x509 -in aps_cert_production.cer -inform DER -outform PEM -out aps_cert_production.pem | |
$ openssl pkcs12 -in aps_key_development.p12 -out aps_key_development.pem -nodes | |
$ openssl pkcs12 -in aps_key_production.p12 -out aps_key_production.pem -nodes |
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 noti = new apns.Notification(); | |
var device = new apns.Device("DEVICE-TOKEN"); | |
noti.sound = "notification.caf"; | |
noti.alert = "Message here!!"; | |
noti.payload = { }; //object with data if you want. | |
noti.device = device; | |
apnsConnection.sendNotification(noti); |
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 apns = require('apn'); | |
var options = { | |
cert: __dirname + '/../config/keys/aps_cert_' + env + '.pem', | |
certData: null, | |
key: __dirname + '/../config/keys/aps_key_' + env + '.pem', | |
keyData: null, | |
gateway: env == 'production' ? 'gateway.sandbox.push.apple.com' : 'gateway.sandbox.push.apple.com', | |
port: 2195, | |
enhanced: true, | |
errorCallback: function(errorCode, note){ |
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
//configure websocket servers | |
var ws_servers = [ | |
{ host: "socket1.example.com", | |
port: "8080"}, | |
{ host: "socket2.example.com", | |
port: "8080"}]; | |
//connect to any server | |
//(recconect and time are optional) | |
WSClient = new RhybooWS({ |
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
COOL.Boot = (function(coolstrap, undefined) { | |
return function() { | |
}; | |
})(COOL); |
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
[{ | |
"type": "rhyboo.start", | |
"ts": "2012-05-02T21:21:19.592+0000", | |
"data": { | |
"tz": -240, | |
"nettype": "WIFI", | |
"osname": "iphone", | |
"un": "iPhone Simulator", | |
"osarch": "x86_64", | |
"osver": "5.0", |
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
#Origin | |
$ git clone <origin repo> | |
$ cd <origin directory> | |
$ git remote rm origin | |
$ git filter-branch --subdirectory-filter ./ -- --all | |
$ git add . | |
$ git commit | |
$ pwd | |
#Target |
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
<a style=display:scroll;position:fixed;top:0px;right:0px; | |
href="http://americancensorship.org/" target="_blank"> | |
<img style="border:0;" src="http://2.bp.blogspot.com/-vkrUQQf0oRk/TxSYo4vMEcI/AAAAAAAABh8/_pDXwiO49pc/s1600/stop-sopa-ribbon.png" /> | |
</a> |
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
UIScrollView *sv = nil; | |
// if iOS5 the scrollView property exists! | |
if ([self.webView respondsToSelector:@selector(scrollView)]) | |
sv = webView.scrollView; | |
else | |
sv = [webView.subviews objectAtIndex:0]; | |
CGSize theSize = [sv contentSize]; |