tag:blogger.com,1999:blog-75581346256510211082024-03-19T11:57:53.236+07:00Sleepy DesignI'm debugger!katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.comBlogger92125tag:blogger.com,1999:blog-7558134625651021108.post-86789852075869888182015-08-31T00:00:00.000+07:002015-08-31T21:55:16.278+07:00Moved to Medium<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-A8EEH7dTxIE/VddkZgVS0gI/AAAAAAAACKQ/sNqkSy64j5k/s1600/Screen-Shot-2558-08-21-at-23.38.41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-A8EEH7dTxIE/VddkZgVS0gI/AAAAAAAACKQ/sNqkSy64j5k/s1600/Screen-Shot-2558-08-21-at-23.38.41.png" /></a></div>
<div style="text-align: center;">
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">tl;dr <a href="https://medium.com/@katopz">https://medium.com/@katopz</a><br /><br />Sorry to say this but blogger is too ugly/buggy/outdate editor.</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">So it's about time to move on to other island.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">I'm now focus on <a href="https://www.meteor.com/" target="_blank">Meteor</a> and <a href="https://developer.apple.com/swift/" target="_blank">Swift</a> at full speed from now on.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Which mean AS3/Flash/AIR/ANE is pretty much dead to me sry!</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br />BTW, I did build my own Jekyll via Github.</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">but blogging with <b>StackEdit</b> or <b><a href="http://sofish.github.io/pen/" target="_blank">WYSIWYG Pen</a> </b>is take me too much time.</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Also I'll end up lonely which shouldn't be good for social buzz.</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">I think I'll play with Jekyll again later </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">when I've have more free time and mojo.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-EQYpaCGSbEA/VeRqee5e1eI/AAAAAAAACK0/8KIliQ1_Hzc/s1600/Screen%2BShot%2B2558-08-31%2Bat%2B21.52.29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="558" src="http://2.bp.blogspot.com/-EQYpaCGSbEA/VeRqee5e1eI/AAAAAAAACK0/8KIliQ1_Hzc/s640/Screen%2BShot%2B2558-08-31%2Bat%2B21.52.29.png" width="640" /></a></div>
<br /></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">For record, I post around 100 stories (some is draft and never publish!) </span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">and I made $100 from ads so far (from 2007/09/09 to 2015/09/09).</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">So Thanks guys! and please welcome to my next half life.</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Which is pretty much same me just new blog facelift. :D</span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: center;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Thanks! for mess with me. And s</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">ee you </span><a href="https://medium.com/@katopz" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;" target="_blank">there</a><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">!</span><br />
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br /></span></div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-76315076266363624822015-07-02T00:25:00.001+07:002015-07-10T22:52:23.475+07:00[EMiner] Your Envato Sales and Earnings Insights with Notifications for iOS<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-HRhThAHhnM8/VZQV4HLXEMI/AAAAAAAACJI/XQqfZg3sCgI/s1600/em-iphone-app-v2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="426" src="http://4.bp.blogspot.com/-HRhThAHhnM8/VZQV4HLXEMI/AAAAAAAACJI/XQqfZg3sCgI/s640/em-iphone-app-v2.png" width="640" /></a></div>
<br />
Yes this is my new app! (<a href="https://itunes.apple.com/us/app/eminer/id986395501?ls=1&mt=8" target="_blank">can download here</a> if you're seller at <a href="http://www.envato.com/" target="_blank">Envato</a>) with took 8 months to get it done! whoops! This happen slower than I expected <a href="http://sleepydesign.blogspot.com/2014/04/objective-c-meaning-my-first-attempt.html" target="_blank">previously Objective-C app</a> which took me around 6 months to learn and release. Let's see my dev log all in one page!<br />
<h4>
Here's what I learn and use to develop</h4>
<ol>
<li><a href="https://developer.apple.com/swift/" target="_blank">Swift</a> 1.0, 1.2, 2.0</li>
<li><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html" target="_blank">Swift Protocols</a></li>
<li><a href="https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Introduction/Introduction.html" target="_blank">Xcode Auto Layout</a></li>
<li><a href="https://github.com/Alamofire/Alamofire" target="_blank">Alamofire</a> </li>
<li><a href="https://github.com/ReactKit/ReactKit" target="_blank">ReactKit</a></li>
<li><a href="https://github.com/ReactKit/SwiftTask" target="_blank">SwiftTask</a></li>
<li><a href="https://parse.com/products/ios" target="_blank">Parse iOS</a></li>
<li><a href="https://github.com/BoltsFramework/Bolts-iOS" target="_blank">Bolts-iOS</a></li>
</ol>
<h4>
And for Backend</h4>
<ol>
<li><a href="https://parse.com/products/core" target="_blank">Parse Cloud Code</a></li>
<li><a href="https://parse.com/products/javascript" target="_blank">Parse<span style="color: black;"> Javascript</span></a></li>
<li><a href="https://parse.com/products/push" target="_blank">Parse Push</a></li>
<li><a href="http://momentjs.com/">Moment.js</a></li>
<li><a href="http://underscorejs.org/">Underscore.js</a></li>
</ol>
<h4>
And for Design</h4>
<ol>
<li><a href="http://www.google.com/design/spec/material-design/introduction.html" target="_blank">Material design</a></li>
<li><a href="https://github.com/katopz/google-material-color-swift" target="_blank">Google Material Color in Swift</a></li>
<li>Flat shaded design for logo</li>
</ol>
<h4>
Finally landing page at <a href="http://debokeh.com/">http://debokeh.com/</a></h4>
<div>
<ol>
<li><a href="https://pages.github.com/" target="_blank">Github Pages</a></li>
<li><a href="http://startbootstrap.com/" target="_blank">Start Bootstrap</a></li>
<li><a href="https://help.github.com/articles/using-jekyll-with-pages/" target="_blank">Jekyll</a></li>
</ol>
</div>
<h4>
And here's fun part (kidding)</h4>
<h3>
<br />#1 Archive Error</h3>
<div>
Everything go as a plan, Even I design all this by myself like usual. I've to revise nearly 5 versions! I'm my worst customer! After digging in Swift migration nightmare and fighting with (awkward) Envato API then the day to release is come....and when I try to Archive... TADAAA</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-gEvGwstO09s/VZLQoQuj6nI/AAAAAAAACIo/AxLNR6PQqq8/s640/Screen%2BShot%2B2015-06-17%2Bat%2B11.49.52%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="500" src="http://2.bp.blogspot.com/-gEvGwstO09s/VZLQoQuj6nI/AAAAAAAACIo/AxLNR6PQqq8/s640/Screen%2BShot%2B2015-06-17%2Bat%2B11.49.52%2BPM.png" width="640" /></a></div>
Hmm....<br />
<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-stretch: normal; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 13.6000003814697px; line-height: 19.7199993133545px;">ERROR ITMS-90362: "Invalid Info.plist value. The value for the key 'MinimumOSVersion' in bundle EnvatoMiner.app/Frameworks/Alamofire.framework is invalid. The minimum value is 8.0"
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'EnvatoMiner.app/Frameworks/Alamofire.framework/Alamofire' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
ERROR ITMS-90206: "Invalid Bundle. The bundle at 'EnvatoMiner.app/Frameworks/ReactKit.framework' contains disallowed file 'Frameworks'."
The resulting API analysis file is too large. We were unable to validate your API usage prior to delivery. This is just an informational message.
WARNING ITMS-90080: "The executable 'Payload/EnvatoMiner.app/Frameworks/Alamofire.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."</span></span></pre>
<h4>
</h4>
<h3>
<br />#2 Frameworks Error</h3>
For <a href="https://github.com/Alamofire/Alamofire" target="_blank">Alamofire</a> and <a href="https://github.com/ReactKit/ReactKit" target="_blank">ReactKit</a> mess up <a href="https://github.com/Alamofire/Alamofire/issues/266" target="_blank">do try use pod to handle Frameworks instead.</a><br />
<h4>
</h4>
<h3>
<br />#3 Optimization Error</h3>
And for<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-stretch: normal; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 13.6000003814697px; line-height: 19.7199993133545px;">ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
</span></span></pre>
<div>
Try use<span style="background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;"> </span><span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 13.6000003814697px; line-height: 21.7600002288818px;">Optimization Level</span></span> to both <span style="background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;">None</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-9Nj9g-bpbnA/VZLTG7nZibI/AAAAAAAACI0/0vzuqBJ9PpQ/s1600/Screen%2BShot%2B2015-06-04%2Bat%2B11.58.56%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://1.bp.blogspot.com/-9Nj9g-bpbnA/VZLTG7nZibI/AAAAAAAACI0/0vzuqBJ9PpQ/s640/Screen%2BShot%2B2015-06-04%2Bat%2B11.58.56%2BPM.png" width="640" /></a></div>
<h3>
<br />#4 Upload Eror</h3>
And guess what I <a href="http://stackoverflow.com/questions/30906207/cannot-upload-new-build-file-xcode-6-3-2" target="_blank">failed to upload binary via Xcode 6.3 </a>just like other , and yes export ipa did the trick<br />
<h3>
<br />#5 Metadata Rejected</h3>
Now binary is up! But guess what!? Final boss is here! TADAAAA<br />
<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-stretch: normal; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 13.6000003814697px; line-height: 19.7199993133545px;">Metadata Rejected
June 30, 2015
Information Needed We began the review of your app but aren't able to continue because we need additional information about your app. At
We began the review of your app but aren't able to continue because we need additional information about your app.
At your earliest opportunity, please review the following question(s) and provide as much detailed information as you can. The more information you can provide upfront, the sooner we can complete your review.
(1) Who is the intended audience of the app?
(2) What is the purpose of the app?
(3) Why does the app require an API key?
(4) Are there any costs associated with the API key?
(5) Are these tied to specific user accounts?
(6) How does the content of the app change with different API keys?
Once you reply to this message in Resolution Center with the requested information, we can proceed with your review.</span></span><span style="color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 1.45;">
</span></pre>
<div>
Yes apparently Apple's reviewer didn't know anything about <a href="https://build.envato.com/api" target="_blank">Envato API</a> so they keep asking me mostly about user privacy concerning which pretty obvious (to me) in my case because Envato site have all this information provided but yeah just play along the rules. Don't forget to answer them nicely.<br />
<h4>
</h4>
<h3>
<br />And here's new trick to save you a day or two</h3>
This clarify will took 1-2 days to ping-pong with reviewer so next time don't forget to add this information (1)-(6) right away while you submit via more information field!<br />
<br />
PS: Want to know what I answer to the reviewer to get approval at 1st try? Wait until my app reach 100 downloads and I will reveal the hint! (Yeah, not again LOL)</div>
<div>
<br />
As you can see it's a plenty things to learn and many problems to hit along the way, Just deal with it and happy coding!<br />
<br /></div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-27124949940145275582015-07-01T00:10:00.000+07:002015-07-01T00:10:33.506+07:00[MQTT] Hello World Message Queuing Telemetry Transport Protocol <br />
<div class="p1">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-77zghsAZN_I/VZLGnN2kZcI/AAAAAAAACIY/N_1zkRw0afo/s1600/MQTT.js.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="http://2.bp.blogspot.com/-77zghsAZN_I/VZLGnN2kZcI/AAAAAAAACIY/N_1zkRw0afo/s640/MQTT.js.png" width="640" /></a></div>
<span class="s1"><br />I'm trying to find something that (hopefully) better than regular socket and found</span><span class="s1"> </span><a href="http://mqtt.org/" target="_blank">MQTT Message Queuing Telemetry Transport Protocol </a> which <a href="http://mqtt.org/2011/08/mqtt-used-by-facebook-messenger" target="_blank">Facebook choose to use it.</a> So it should be good enough! let's try it! BTW This is boring terminal things, I blog it for reference later :D</div>
<div class="p1">
<br /></div>
<div class="p1">
First of all running some server (at local Mac) My first try is <a href="http://mosquitto.org/" target="_blank">Mosquitto</a> Let's brew it!</div>
<div class="p1">
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ brew install mosquitto</pre>
</div>
<div class="p1">
Installing...<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">==> Installing dependencies for mosquitto: c-ares, libwebsockets
==> Installing mosquitto dependency: c-ares
==> Downloading https://homebrew.bintray.com/bottles/c-ares-1.10.0.yosemite.bott
######################################################################## 100.0%
==> Pouring c-ares-1.10.0.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/c-ares/1.10.0: 57 files, 540K
==> Installing mosquitto dependency: libwebsockets
==> Downloading https://homebrew.bintray.com/bottles/libwebsockets-1.4.yosemite.
######################################################################## 100.0%
==> Pouring libwebsockets-1.4.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/libwebsockets/1.4: 23 files, 3.3M
==> Installing mosquitto
==> Downloading https://homebrew.bintray.com/bottles/mosquitto-1.4.2.yosemite.bo
######################################################################## 100.0%
==> Pouring mosquitto-1.4.2.yosemite.bottle.tar.gz
==> Caveats
mosquitto has been installed with a default configuration file.
You can make changes to the configuration by editing:
/usr/local/etc/mosquitto/mosquitto.conf
To have launchd start mosquitto at login:
ln -sfv /usr/local/opt/mosquitto/*.plist ~/Library/LaunchAgents
Then to load mosquitto now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mosquitto.plist
Or, if you don't want/need launchctl, you can just run:
mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf
==> Summary
🍺 /usr/local/Cellar/mosquitto/1.4.2: 28 files, 700K</pre>
Try it!<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ mosquitto
-bash: mosquitto: command not found</pre>
</div>
<div class="p1">
<span class="s1">Aww, command not found eh!? Let see...</span></div>
<div class="p1">
<span class="s1"></span><br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ /usr/local/sbin/mosquitto
1433485808: mosquitto version 1.4.2 (build date 2015-05-08 13:55:22-0700) starting
1433485808: Using default config.
1433485808: Opening ipv4 listen socket on port 1883.
1433485808: Opening ipv6 listen socket on port 1883.</pre>
</div>
<div class="p1">
Hit ^C and use this magic<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ sudo ln -s /usr/local/sbin/mosquitto /bin/mosquitto</pre>
</div>
<div class="p1">
<span class="s1">So we can start it properly now (let's call it terminal#1)</span></div>
<div class="p1">
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ mosquitto
1433488093: mosquitto version 1.4.2 (build date 2015-05-08 13:55:22-0700) starting
1433488093: Using default config.
1433488093: Opening ipv4 listen socket on port 1883.
1433488093: Opening ipv6 listen socket on port 1883.</pre>
</div>
<div class="p1">
Then for client side I choose <a href="https://www.npmjs.com/package/mqtt">https://www.npmjs.com/package/mqtt</a><br />Let's new another terminal#2 to install and run it (you will need <a href="https://nodejs.org/" target="_blank">nodejs</a> installed)<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ sudo npm install mqtt -g</pre>
</div>
<div class="p1">
Installing... (took sometime)<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">> bufferutil@1.1.0 install /usr/local/lib/node_modules/mqtt/node_modules/websocket-stream/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node: Finished
> utf-8-validate@1.1.0 install /usr/local/lib/node_modules/mqtt/node_modules/websocket-stream/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild
child_process: customFds option is deprecated, use stdio instead.
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
SOLINK_MODULE(target) Release/validation.node: Finished
/usr/local/bin/mqtt_sub -> /usr/local/lib/node_modules/mqtt/bin/sub.js
/usr/local/bin/mqtt_pub -> /usr/local/lib/node_modules/mqtt/bin/pub.js
/usr/local/bin/mqtt -> /usr/local/lib/node_modules/mqtt/mqtt.js
mqtt@1.3.2 /usr/local/lib/node_modules/mqtt
├── inherits@2.0.1
├── xtend@4.0.0
├── minimist@1.1.1
├── commist@1.0.0 (leven@1.0.2)
├── readable-stream@1.0.33 (isarray@0.0.1, string_decoder@0.10.31, core-util-is@1.0.1)
├── mqtt-packet@3.2.0 (bl@0.9.4)
├── mqtt-connection@2.1.1 (through2@0.6.5, reduplexer@1.1.0)
├── end-of-stream@1.1.0 (once@1.3.2)
├── help-me@0.1.0 (pump@1.0.0)
├── concat-stream@1.5.0 (typedarray@0.0.6, readable-stream@2.0.1)
└── websocket-stream@1.5.0 (through2@0.6.5, duplexify@3.4.2, ws@0.7.2)</pre>
At terminal#2 and try <span style="background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;">subscribe</span><br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ mqtt sub -t 'hello' -h 'test.mosquitto.org' -v</pre>
Got this at server terminal#1<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">1435683811: New connection from 127.0.0.1 on port 1883.
1435683811: New client connected from 127.0.0.1 as mqttjs_30eb07a2 (c1, k10).</pre>
New terminal#3 and try <span style="background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;">publish</span><br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ mqtt pub -t 'hello' -h '127.0.0.1' -m 'from MQTT.js'
</pre>
You will get this at terminal#2<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">hello from MQTT.js</pre>
And got this on server side<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-stretch: normal; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span style="color: #333333; font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;"><span style="font-size: 13.6000003814697px; line-height: 19.7199993133545px;">1435683939: New connection from 127.0.0.1 on port 1883.
1435683939: New client connected from 127.0.0.1 as mqttjs_9fb1e1b2 (c1, k10).
1435683939: Client mqttjs_9fb1e1b2 disconnected.</span></span></pre>
</div>
<div class="p1">
Easy! Just some magic need and we good to go, Next post we will find <a href="http://sleepydesign.blogspot.com/2015/06/swift-actionhero-client-with-swift.html" target="_blank">ActionHero alike</a> for this MQTT thing!<br />
<br />
Happy Coding!</div>
<div class="p1">
<span class="s1"><br /></span></div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-38409736277805472142015-06-05T20:30:00.000+07:002015-06-05T20:30:06.582+07:00[Swift] ActionHero Client with Swift<div style="text-align: center;">
Tadaa</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/97060/7796914/f5e73e50-030e-11e5-9d7e-6eda358e516c.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://cloud.githubusercontent.com/assets/97060/7796914/f5e73e50-030e-11e5-9d7e-6eda358e516c.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Tadaaaaa </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/97060/7796917/fec241d2-030e-11e5-9404-4e7c9eb46e16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://cloud.githubusercontent.com/assets/97060/7796917/fec241d2-030e-11e5-9404-4e7c9eb46e16.png" width="504" /></a></div>
<br />
<h4>
Here's Swift version</h4>
<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">client <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">=</span> AHClient()
client<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>alert<span class="pl-pds" style="box-sizing: border-box;">"</span></span>) { message <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">in</span> println(message)}
client<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>api<span class="pl-pds" style="box-sizing: border-box;">"</span></span>) { message <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">in</span> println(message)}
client<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>welcome<span class="pl-pds" style="box-sizing: border-box;">"</span></span>) { message <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">in</span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">self</span><span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>appendMessage(message)}
client<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>say<span class="pl-pds" style="box-sizing: border-box;">"</span></span>) { message <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">in</span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">self</span><span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>appendMessage(message)}
client<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>connect() {
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">self</span><span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>client<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>roomAdd(<span style="color: #183691; font-size: 13.6000003814697px; line-height: 1.45;">"</span><span style="color: #183691; font-size: 13.6000003814697px; line-height: 1.45;">defaultRoom</span><span style="color: #183691; font-size: 13.6000003814697px; line-height: 1.45;">"</span><span style="font-size: 13.6000003814697px; line-height: 1.45;">);</span>
}
</pre>
<h4>
Compare to JS version</h4>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">client <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">=</span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">new</span> <span class="pl-en rich-diff-level-one" style="box-sizing: border-box; color: #795da3;">ActionheroClient</span>;
client.on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">'</span>alert<span class="pl-pds" style="box-sizing: border-box;">'</span></span>, <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">function</span>(<span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">message</span>){ <span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">alert</span>( <span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">JSON</span>.stringify(message) ) })
client.on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">'</span>api<span class="pl-pds" style="box-sizing: border-box;">'</span></span>, <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">function</span>(<span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">message</span>){ <span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">alert</span>( <span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">JSON</span>.stringify(message) ) })
client.on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">'</span>welcome<span class="pl-pds" style="box-sizing: border-box;">'</span></span>, <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">function</span>(<span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">message</span>){ appendMessage(message); })
client.on(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">'</span>say<span class="pl-pds" style="box-sizing: border-box;">'</span></span>, <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">function</span>(<span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">message</span>){ appendMessage(message); })
client.connect(<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">function</span>(<span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">err</span>, <span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">details</span>){
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">if</span>(err <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">!=</span> <span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">null</span>){
<span class="pl-en rich-diff-level-one" style="box-sizing: border-box; color: #795da3;">console</span><span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">.log</span>(err);
}<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">else</span>{
client.roomAdd(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>defaultRoom<span class="pl-pds" style="box-sizing: border-box;">"</span></span>);
<span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">document</span>.<span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">getElementById</span>(<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>name<span class="pl-pds" style="box-sizing: border-box;">"</span></span>).innerHTML <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">=</span> <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-cce" style="box-sizing: border-box;">\"</span>color:#<span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">+</span> intToARGB(hashCode(client.<span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">id</span>)) <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">+</span> <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-cce" style="box-sizing: border-box;">\"</span>><span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">+</span> client.<span class="pl-c1 rich-diff-level-one" style="box-sizing: border-box; color: #0086b3;">id</span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">+</span> <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span></span><span class="pl-pds" style="box-sizing: border-box;">"
<span style="font-size: 13.6000003814697px; line-height: 1.45;"> </span><span style="color: black; font-family: Times; font-size: small; line-height: normal; white-space: normal;">}
});</span>
</span></pre>
Nice eh? :D<br />
<br />
BTW : It's just proof of concept, no error/test, so heavy fork is need!<br />
FYI : I'm moving on to <a href="http://mqtt.org/" target="_blank">MQTT</a> , so don't expect any update so soon.<br />
TL;DR : <a href="https://github.com/katopz/actionhero-client-swift">https://github.com/katopz/actionhero-client-swift</a><br />
<br />
Happy Coding!<br />
<br />katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-18086574339903704822015-05-28T21:40:00.003+07:002015-05-28T21:40:42.093+07:00[Swift] Hello World Primus with Swift via ActionHeroJS<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/97060/7701128/46d71f9e-fe4e-11e4-83b5-923603acd917.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://cloud.githubusercontent.com/assets/97060/7701128/46d71f9e-fe4e-11e4-83b5-923603acd917.png" width="536" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;">Pretty much same as <a href="http://sleepydesign.blogspot.com/2015/05/nodejs-hello-world-primus-with.html" target="_blank">Objective-C implement</a> nothing to special, just this fancy block</span><span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;">...<br /></span></div>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">class</span> Block<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;"><</span>T<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">></span> {
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">let</span> f <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">:</span> T
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">init</span> (_ f: T){ <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">self</span><span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span>f <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">=</span> f }
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">var</span> casted: AnyObject { <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">get</span> { <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">return</span> unsafeBitCast(f, AnyObject<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">.</span><span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">self</span>) } }
}</pre>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;">Which I can't find shorter way yet</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;">TL;DR : </span><span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 13px; line-height: 18.2000007629395px;"><a href="https://github.com/katopz/primus-objc-swift-helloworld">https://github.com/katopz/primus-objc-swift-helloworld</a></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 13px; line-height: 18.2000007629395px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.2000007629395px;">Happy Coding!</span></div>
<br />
<br />
<br />katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-69765141751236708542015-05-27T21:09:00.000+07:002015-05-27T23:23:07.738+07:00[NodeJS] Hello World Primus with Objective-C via ActionHeroJS<div class="separator" style="clear: both; text-align: center;">
<a href="https://cloud.githubusercontent.com/assets/97060/7701128/46d71f9e-fe4e-11e4-83b5-923603acd917.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://cloud.githubusercontent.com/assets/97060/7701128/46d71f9e-fe4e-11e4-83b5-923603acd917.png" width="536" /></a></div>
From my <a href="http://sleepydesign.blogspot.com/2015/05/nodejs-helloworld-hapi-and-faye.html" target="_blank">previous post about Hapi and Faye</a> I did mention about Hello World from Objective-C, So here it is! :D<br />
<br />
I'm using <a href="https://github.com/seegno/primus-objc" target="_blank">Primus Objective-C</a> to send data to <a href="http://www.actionherojs.com/" target="_blank">ActionHeroJS</a> at this time. Next stop is Swift implement ;)<br />
<br />
TL;DR : <a href="https://github.com/katopz/primus-objc-helloworld" target="_blank">https://github.com/katopz/primus-objc-helloworld</a><br />
<br />
Happy Coding!<br />
<br />katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-91957135043877415242015-05-11T21:36:00.001+07:002015-05-11T21:36:38.039+07:00[NodeJS] HelloWorld Hapi And Faye<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I did experiment with <a href="http://expressjs.com/" target="_blank">express</a> and <a href="http://faye.jcoglan.com/" target="_blank">faye</a> for serving static content and socket thingy <a href="https://github.com/katopz/chat-node-express-faye-sample/commit/8899630b72baf3ebe928e1362345c6d96b21d780" target="_blank">before</a> (Forget to blog about it arghhhh sry!), but I just run into some mention that real man use <a href="http://hapijs.com/" target="_blank">hapi</a> and <a href="http://faye.jcoglan.com/" target="_blank">faye</a> seem to be a <a href="https://developer.gitter.im/docs/faye-endpoint" target="_blank">weapon of choices</a> for <a href="https://gitter.im/" target="_blank">gitter</a> </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
As usual, I love to collect weapons for my upcoming project (many of them never use for production LOL). And after an hour with a little modification here's result... // TODO : sound TADAAA</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-VUpnoKhkIHU/VVB-dIUcJpI/AAAAAAAACF4/B1xpjSLuS80/s1600/Screen%2BShot%2B2558-05-11%2Bat%2B17.02.53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://3.bp.blogspot.com/-VUpnoKhkIHU/VVB-dIUcJpI/AAAAAAAACF4/B1xpjSLuS80/s640/Screen%2BShot%2B2558-05-11%2Bat%2B17.02.53.png" width="626" /></a></div>
tl;dr : <a href="https://github.com/katopz/hapi-faye-helloworld" target="_blank">https://github.com/katopz/hapi-faye-helloworld</a><br />
<br />
If you have keen eye you will spot...<br />
<br />
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span class="pl-c rich-diff-level-one" style="box-sizing: border-box;"><span style="color: #444444;">Got a message: hi from objc ^^</span></span></pre>
<br />
That's right! It's not just js to js (which is too easy!) but also some sub/pub from objtive-c too! If you feeling brave please feel free to follow <a href="https://github.com/OlehKulykov/FayeCpp" target="_blank">FayeCpp</a> setup instruction then <a href="https://github.com/katopz/FayeCpp/commit/954ff95829418f530e33cafa859176724ea8973d" target="_blank">apply my patched</a> and enjoy!<br />
<br />
Happy Coding! :D<br />
<br />katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-53740024855875408572015-04-30T23:31:00.000+07:002015-04-30T23:31:12.196+07:00[VSCode] Visual Studio Code Newbies Pitfal<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-tQME7Si8lTM/VUJUfXILpgI/AAAAAAAACFU/-Bn6PS1MfrQ/s1600/Screen%2BShot%2B2015-04-30%2Bat%2B10.41.16%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-tQME7Si8lTM/VUJUfXILpgI/AAAAAAAACFU/-Bn6PS1MfrQ/s1600/Screen%2BShot%2B2015-04-30%2Bat%2B10.41.16%2BPM.png" height="430" width="640"></a></div>
M$ just <a href="http://blogs.msdn.com/b/dotnet/archive/2015/04/29/net-announcements-at-build-2015.aspx" target="_blank">release</a>Â (with hard to find link to)Â <a href="https://code.visualstudio.com/" target="_blank">Visual Studio Code</a>Â and yes it's temping to try another cross-platform tool, so here we go! <a href="https://code.visualstudio.com/docs/nodejs" target="_blank">let start with nodejs</a>Â yeah!<br>
<br>
<h4>
<span style="color: #990000;">First trap!</span>Â </h4>
<br>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ npm install -g express
npm ERR<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">!</span> Error: EACCES, mkdir <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">'</span>/usr/local/lib/node_modules/express<span class="pl-pds" style="box-sizing: border-box;">'</span></span></pre>
<b>@katopz</b> :Â No worry! sudo is here to help<br><br>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ sudo npm install -g express</pre>
<br>
<h4>
<span style="color: #990000;">2nd trap!</span></h4>
<br>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ cd myExpressApp
<span style="font-size: 13.6000003814697px; line-height: 1.45;">$ </span>code .
-bash: code: command not found </pre>
<b>@katopz : </b>That's because you missing this step <a href="https://code.visualstudio.com/Docs/setup" target="_blank">here</a> tl;dr just open (replace "katopz" with your cool name) <span style="background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;">/Users/</span><span style="background-color: rgba(0, 0, 0, 0.0392157); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;"><span style="color: #e69138;">katopz</span></span><span style="background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;">/.bash_profile</span> then add code below, save, reopen your terminal<br><br>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; font-weight: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;"><span class="pl-en rich-diff-level-one" style="box-sizing: border-box; color: #795da3;">code</span> () {
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">if</span> [[ <span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">$#</span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">=</span> 0 ]]
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">then</span>
open -a <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>Visual Studio Code<span class="pl-pds" style="box-sizing: border-box;">"</span></span>
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">else</span>
[[ <span class="pl-smi rich-diff-level-one" style="box-sizing: border-box;">$1</span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">=</span> /<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">*</span> ]] <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">&&</span> F=<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-smi" style="box-sizing: border-box; color: #333333;">$1</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span> <span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">||</span> F=<span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-smi" style="box-sizing: border-box; color: #333333;">$PWD</span>/<span class="pl-smi" style="box-sizing: border-box; color: #333333;">${1<span class="pl-k" style="box-sizing: border-box; color: #a71d5d;">#</span>.<span class="pl-k" style="box-sizing: border-box; color: #a71d5d;">/</span>}</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span>
open -a <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span>Visual Studio Code<span class="pl-pds" style="box-sizing: border-box;">"</span></span> --args <span class="pl-s rich-diff-level-one" style="box-sizing: border-box; color: #183691;"><span class="pl-pds" style="box-sizing: border-box;">"</span><span class="pl-smi" style="box-sizing: border-box; color: #333333;">$F</span><span class="pl-pds" style="box-sizing: border-box;">"</span></span>
<span class="pl-k rich-diff-level-one" style="box-sizing: border-box; color: #a71d5d;">fi</span>
}</pre>
<b>@katopz : </b>Or just forget that! And "open" with Visual Studio Code that you downloaded<br>
<br>
<pre class="rich-diff-level-zero" style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.6000003814697px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; margin-left: 15px; overflow: auto; padding: 10px 20px; word-wrap: normal;">$ sudo npm install -g express</pre>
<span style="color: #990000;"></span><br>
<a href="http://sleepydesign.blogspot.com/2015/04/vscode-visual-studio-code-newbies-pitfal.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-73838641595723071332015-03-08T21:34:00.000+07:002015-12-14T22:06:52.274+07:00[OSX] Upgrade Mavericks to Yosemite the hard way<br>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-yEx4369bSTY/VPs8OMxqUEI/AAAAAAAACDg/4yXvnWi0CcA/s1600/Screen%2BShot%2B2015-03-08%2Bat%2B12.57.43%2BAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="452" src="http://2.bp.blogspot.com/-yEx4369bSTY/VPs8OMxqUEI/AAAAAAAACDg/4yXvnWi0CcA/s1600/Screen%2BShot%2B2015-03-08%2Bat%2B12.57.43%2BAM.png" width="640"></a></div>
<h3>
Intro</h3>
Quite a long time that I didn't upgrade my PC hardware <a href="http://sleepydesign.blogspot.com/2012/11/xcode-summon-unibeast-on-pc-for-xcode.html" target="_blank">(before 2012 I think)</a>, And last time I just <a href="http://sleepydesign.blogspot.com/2014/05/osx-how-to-boot-maverick-on-pc.html" target="_blank">upgrade OSX to Maverick</a> but suddenly Xcode required to use Yosemite...grhhh So I've 2 task to accomplish here,<br>
<br>
<ol>
<li><a href="http://www.tonymacx86.com/yosemite-desktop-guides/143917-guide-update-os-x-mavericks-os-x-yosemite-using-unibeast-multibeast.html" target="_blank">upgrade my Maverick to Yosemite</a> for Xcode sake.</li>
<li>upgrade my hardware which is EVGA GTS250 PCIExpressx16 Gen 2 1G GDDR3 to ASUS GeForce® GTX 750 Ti OC 2G (which is same price at that time but yeah faster obviously)</li>
</ol>
<br>
Due to many step and <a href="http://www.tonymacx86.com/basics/104536-troubleshooting-issuing-boot-flags.html" target="_blank">Boot Flags</a> to miss and mess up and yes I did lost a whole day and night to finish it! Then it a good reason to write it here for my own use later and should be save save someone time! Let's go!<br>
<h3>
My PC System</h3>
<ul>
<li>Model Identifier:<span class="Apple-tab-span" style="white-space: pre;"> </span>MacPro3,1</li>
<li>Processor Name:<span class="Apple-tab-span" style="white-space: pre;"> </span>Intel Core i5</li>
<li>Processor Speed:<span class="Apple-tab-span" style="white-space: pre;"> </span>3.21 GHz</li>
<li>Number of Processors:<span class="Apple-tab-span" style="white-space: pre;"> </span>1</li>
<li>Total Number of Cores:<span class="Apple-tab-span" style="white-space: pre;"> </span>2</li>
<li>L2 Cache (per Core):<span class="Apple-tab-span" style="white-space: pre;"> </span>256 KB</li>
<li>L3 Cache:<span class="Apple-tab-span" style="white-space: pre;"> </span>4 MB</li>
<li>Memory:<span class="Apple-tab-span" style="white-space: pre;"> </span>12 GB</li>
<li>Boot ROM Version:<span class="Apple-tab-span" style="white-space: pre;"> </span>MultiBeast.tonymacx86.com</li>
<li>SMC Version (system):<span class="Apple-tab-span" style="white-space: pre;"> </span>1.30f3</li>
<li><span style="color: #990000;">Graphics: ASUS GeForce® GTX 750 Ti OC 2G <b>*My new baby yeah!</b></span></li>
</ul>
<h3>
Prerequisite</h3>
<ul>
<li><a href="http://www.tonymacx86.com/downloads.php?do=file&id=253" target="_blank">UniBeast 5.1.0</a></li>
<li><a href="http://www.tonymacx86.com/downloads.php?do=file&id=254" target="_blank">MultiBeast - Yosemite 7.2.0</a></li>
<li><a href="http://www.tonymacx86.com/downloads.php?do=file&id=246" target="_blank">Chimera 4.0.1</a></li>
</ul>
<h4>
Problem #1</h4>
<blockquote class="tr_bq">
Stuck at [IOBluetoothHCIController][SearchForTransportEventTimeOutHandler] -- Missing Bluetooth Controller Transport!</blockquote>
<h4>
Solution #1</h4>
<ul>
<li>It's not a bluetooth problem at all, actually it's a process after that which is graphic related so don't bother fix bluetooth. do try (-v is for trace purpose, no effect)<br><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">-v -x</pre>
or<br><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">-v -x GraphicsEnabler=Yes nv_disable=1</pre>
</li>
</ul>
<h4>
Problem #2</h4>
<blockquote class="tr_bq">
nv_disable=1 did boot and getting in OSX but got glitch+slow render </blockquote>
<h4>
Solution #2</h4>
<ul>
<li>boot in safe mode with -v -x to getting in to OSX and... </li>
<li>Install <a href="http://www.nvidia.com/object/macosx-cuda-6.5.46-driver.html">http://www.nvidia.com/object/macosx-cuda-6.5.46-driver.html</a></li>
<li>Install <a href="http://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/Mac/Quadro_Certified/343.02.02f01/WebDriver-343.02.02f01.pkg&lang=us&type=GeForce">http://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/Mac/Quadro_Certified/343.02.02f01/WebDriver-343.02.02f01.pkg&lang=us&type=GeForce</a></li>
<li>Run <a href="http://www.tonymacx86.com/downloads.php?do=file&id=254" target="_blank">MultiBeast - Yosemite 7.2.0</a></li>
<li>Select Quick start -> EasyBeast</li>
<li>Forget about Drivers you can mess it later.</li>
<li>Select Customize and make sure <a href="http://www.tonymacx86.com/downloads.php?do=file&id=246" target="_blank">Chimera 4.0.1</a> is install and selected</li>
<li>Build and org.chameleon.Boot.plist should look like picture above (on top of the blog) except "device-properties" (will do this later)</li>
</ul>
<blockquote class="tr_bq">
</blockquote>
<h4>
Problem #3</h4>
<blockquote class="tr_bq">
Try login Mac App Store but get... </blockquote>
<ul>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: #6aa84f;"><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">"Your device or computer could not be verified. Contact support for assistance." </pre>
</span></li>
</ul>
<h4>
Solution #3</h4>
<ul>
<li>try this : <a href="http://www.hackintoshosx.com/topic/19442-guide-get-icloud-app-store-and-imessage-working/">http://www.hackintoshosx.com/topic/19442-guide-get-icloud-app-store-and-imessage-working/</a></li>
<li>and org.chameleon.Boot.plist should look like picture above (on top of the blog)Â </li>
</ul>
<h4>
Problem #4</h4>
<blockquote class="tr_bq">
boot flags keep getting nvda_drv=1 <a href="http://www.tonymacx86.com/general/114513-solved-chimera-bootmenu-nvda_drv-1-a.html" target="_blank">like this</a></blockquote>
<h4>
Solution #4</h4>
<ul>
<li>#to see it's there</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: #6aa84f;"><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ nvram -p</pre>
</span></li>
<li>#to delete it (sudo did the trick for me)</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;"><span style="color: #6aa84f;"><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ sudo nvram -d boot-args</pre>
</span></li>
</ul>
<h4>
Hint!</h4><a href="http://sleepydesign.blogspot.com/2015/03/osx-upgrade-mavericks-to-yosemite-hard.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-51515177473842365342015-01-24T00:47:00.000+07:002015-02-04T22:11:38.559+07:00[AIR] How to build ANE 64-bit<br>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-ROdeawws1ro/VMImIWBzY4I/AAAAAAAACCs/mcEKC-Enny8/s1600/Screen%2BShot%2B2558-01-23%2Bat%2B17.15.42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="How to build ANE 64-bit" border="0" src="http://4.bp.blogspot.com/-ROdeawws1ro/VMImIWBzY4I/AAAAAAAACCs/mcEKC-Enny8/s1600/Screen%2BShot%2B2558-01-23%2Bat%2B17.15.42.png" height="299" title="How to build ANE 64-bit" width="640"></a></div>
<h3>
TL;TR</h3>
<a href="http://easynativeextensions.com/making-your-ios-apps-universal/">http://easynativeextensions.com/making-your-ios-apps-universal/</a><br>
<br>
<h3>
Or try doing thing backward here ;)</h3>
<ol>
<li>Open your Mac.</li>
<li>Open Facebook check it fast and close it!</li>
<li>Make sure Adobe AIR SDK is update to most recent by <a href="http://brew.sh/" target="_blank">brew</a> it. (or install if you don't have one)</li>
<li><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ brew upgrade adobe-air-sdk</pre>
</li>
<li>Make sure AIR SDK path is set.<br><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ <span class="pl-s" style="box-sizing: border-box; color: #a71d5d;">export</span> AIR_HOME=/usr/local/Cellar/adobe-air-sdk/16.0.0.272/libexec</pre>
</li>
<li>Clone my working ANE 64-bit ready <a href="https://github.com/katopz/ane-device-file-util">https://github.com/katopz/ane-device-file-util</a></li>
<li>Go to /ane-device-file-util/as3/bin<br><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ cd /ane-device-file-util/as3/bin</pre>
try<br><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.8999996185303px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ bash build.sh</pre>
</li>
<li>Open your Twitter, tweet something and close it!</li>
<li>Smile!</li>
<li>That's it! </li>
</ol>
<div>
<b>You just build ANE from working static library "libDeviceFileUtil.a", now let's try make one your own! Follow this step below...</b><br>
</div><a href="http://sleepydesign.blogspot.com/2015/01/air-how-to-build-ane-64-bit.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-60650341472507896012015-01-08T00:37:00.000+07:002015-01-20T14:38:16.618+07:00[Cucumber] Hello Calabash Swift iOS<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/--YFm0UBwyyc/VK1m_xEfm9I/AAAAAAAACCE/4V_q3WmheCM/s1600/Screen%2BShot%2B2015-01-08%2Bat%2B12.03.39%2BAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/--YFm0UBwyyc/VK1m_xEfm9I/AAAAAAAACCE/4V_q3WmheCM/s1600/Screen%2BShot%2B2015-01-08%2Bat%2B12.03.39%2BAM.png" height="224" width="640" /></a></div>
<h3>
Behavior-driven development (BDD) Why?</h3>
<ul>
<li>why not?</li>
<li>it's fun</li>
<li>why not!?</li>
</ul>
<h3>
Required</h3>
<ol>
<li><a href="http://brew.sh/" target="_blank">http://brew.sh/</a></li>
<li><span style="color: #6aa84f;">$ brew install ruby</span></li>
<li><span style="color: #6aa84f;">$ gem install calabash-cucumber --no-ri --no-rdoc</span></li>
<li><span style="color: #6aa84f;">$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer</span></li>
<li><span style="color: #6aa84f;">$ sudo gem install bundler</span></li>
</ol>
<h3>
Install</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-O49s3uNttJg/VK1ZZa6aRII/AAAAAAAACB0/ITz3XaIvSxM/s1600/Screen%2BShot%2B2015-01-07%2Bat%2B11.04.47%2BPM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
<ol>
<li><span style="color: #6aa84f;">$ git clone https://github.com/codingricky/todoSwift</span></li>
<li>In Xcode : open SingleTodo.xcodeproj and set Build Active Architecture Only = No<br /><br /><a href="http://2.bp.blogspot.com/-O49s3uNttJg/VK1ZZa6aRII/AAAAAAAACB0/ITz3XaIvSxM/s1600/Screen%2BShot%2B2015-01-07%2Bat%2B11.04.47%2BPM.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://2.bp.blogspot.com/-O49s3uNttJg/VK1ZZa6aRII/AAAAAAAACB0/ITz3XaIvSxM/s1600/Screen%2BShot%2B2015-01-07%2Bat%2B11.04.47%2BPM.png" height="208" width="640" /></a></li>
<li>fix error as Xcode suggest, build and run once to make sure it work properly</li>
<li><span style="color: #6aa84f;">$ cd todoSwift</span></li>
<li><span style="color: #6aa84f;">$ calabash-ios setup</span></li>
<li>if you get<br />
<blockquote class="tr_bq">
<span style="color: #76a5af;">._SingleTodo.xcodeproj</span><br />
<span style="color: #76a5af;">We don't yet support this. Please setup calabash manually.</span></blockquote>
do try delete it by...<br /><br /><span style="color: #6aa84f;">$ rm ._SingleTodo.xcodeproj</span><br /><br />
</li>
<li>In Xcode : switch to SingleTodo-cal scheme</li>
<li><span style="color: #6aa84f;">$ calabash-ios gen</span></li>
<li><span style="color: #6aa84f;">$ cucumber</span></li>
</ol>
<div>
<h3>
Trouble?</h3>
</div>
<div>
<ol>
<li>cry</li>
<li>make sure all update <a href="https://github.com/calabash/calabash-ios/wiki/B1-Updating-your-Calabash-iOS-version#updating-calabash-ios" target="_blank">https://github.com/calabash/calabash-ios/wiki/B1-Updating-your-Calabash-iOS-version#updating-calabash-ios</a> and close then reopen terminal </li>
<li>try <a href="https://github.com/calabash/calabash-ios/wiki/Hot-Topics#1-when-targeting-a-simulator-the-app-launches-then-quits-several-times-in-rapid-succession" target="_blank">https://github.com/calabash/calabash-ios/wiki/Hot-Topics#1-when-targeting-a-simulator-the-app-launches-then-quits-several-times-in-rapid-succession</a></li>
<li><a href="https://github.com/calabash/calabash-ios/issues/658" target="_blank">Time out waiting for UIAutomation run-loop?</a> try this<br /><br /><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ DEVICE_TARGET=<span class="pl-s1" style="box-sizing: border-box; color: #df5000;"><span class="pl-pds" style="box-sizing: border-box;">"</span>iPhone 6 (8.1 Simulator)<span class="pl-pds" style="box-sizing: border-box;">"</span></span> cucumber</pre>
<br />
</li>
<li>Unable to unzip calabash.framework.zip? try here for temporary workaround <a href="https://github.com/calabash/calabash-ios/issues/682">https://github.com/calabash/calabash-ios/issues/682</a><br /><br /><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">----------Info----------
error: cannot delete old ./calabash.framework/Headers
error: cannot delete old ./calabash.framework/Resources
error: cannot delete old ./calabash.framework/Versions/0.12.0
error: cannot delete old ./calabash.framework/Versions/Current
caution: excluded filename not matched: __MACOSX/<span class="pl-k" style="box-sizing: border-box; color: #a71d5d;">*</span>
caution: excluded filename not matched: calabash.framework/.DS_Store
----------Error----------
Unable to unzip file: /usr/local/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.12.1/bin/../staticlib/calabash.framework.zip
You must install manually.
---------------------------</pre>
</li>
<li>yelling for permission? gimme sudo!</li>
<li><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"><span style="color: #333333;">$ sudo chown -R </span><span style="color: #990000;">replace_this_with_your_name</span><span style="color: #333333;"> /usr/local/lib/ruby/gems/2.2.0</span></pre>
</li>
</ol>
<h3>
Cached?</h3>
<div>
<ul>
<li><a href="https://github.com/calabash/calabash-ios/issues/659" target="_blank">Change thing in Xcode but app not update?</a></li>
</ul>
</div>
<div>
<ol>
<li><span style="color: #6aa84f;"><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;">$ calabash-ios sim reset</pre>
</span></li>
</ol>
</div>
<div>
<h3>
Next?</h3>
</div>
</div>
<ul>
<li>Refer to <a href="https://github.com/calabash/calabash-ios/issues/659" target="_blank">https://github.com/calabash/calabash-ios/issues/659</a> I've to change <a href="http://www.codingricky.com/calabash-ing-ios-applications/" target="_blank">original</a> step a little bit, let's edit <span style="color: #990000;">features/my_first.feature</span> like this</li>
</ul>
<ol>
<li><pre style="background-color: #f7f7f7; border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"><pre style="border-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-break: normal; word-wrap: normal;"><span style="color: #333333;">Feature: Todo list application can add tasks
As a user
I want to add tasks
So I can remember to do things
Scenario: Add Task
Given I am on the Welcome Screen
When I touch "Add"
</span><span style="color: red;">Then I enter "listening to Taylor Swift" into input field number 1</span><span style="color: #333333;">
And I touch "Add task"
Then I wait for "listening to Taylor Swift" to appear</span></pre>
</pre>
</li>
</ol>
<div>
<h3>
Reference</h3>
</div>
<ul>
<li><a href="http://www.codingricky.com/calabash-ing-ios-applications/" target="_blank">http://www.codingricky.com/calabash-ing-ios-applications/</a></li>
<li><a href="https://github.com/calabash/calabash-ios/wiki/02-Predefined-steps" target="_blank">https://github.com/calabash/calabash-ios/wiki/02-Predefined-steps</a></li>
<li><a href="https://github.com/calabash/calabash-ios">https://github.com/calabash/calabash-ios</a></li>
</ul>
<div>
<h3>
Note to self</h3>
</div>
<div>
<ul>
<li>tag working copy : <a href="https://github.com/katopz/todoSwift" target="_blank">https://github.com/katopz/todoSwift</a></li>
</ul>
<div>
Happy Testing! :D</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-22122682723875368022014-12-15T22:05:00.000+07:002014-12-15T22:05:24.432+07:00[ANE] Love is in the AIRI'm now busy with my new iOS app in Swift language, but I'm still doing AS3/AIR in daily basis job also still blog about AS3 and AIR so it's not seem to dead yet this year thanks for ANE ;)<br>
<br>
Lucky me I got skill in <a href="https://github.com/katopz" target="_blank">Objective-C, Java, C++, C#</a> so I can finish my job with <a href="http://sleepydesign.blogspot.com/2012/12/ane-pay-it-forward-more-free-ane.html" target="_blank">plenty of my homemade ANE</a> but some developer is left behind...<br>
<br>
Lucky you, This day we got <a href="http://sleepydesign.blogspot.com/2012/07/ane-free-air-native-extensions.html" target="_blank">plenty of free/paid ANE</a>, one of them is <a href="http://www.facebook.com/pages/DiaDraw/195440900526169" target="_blank">DiaDraw</a><br>
<br>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://easynativeextensions.com/product/diadraw-camera-driver-ios-android/?ref=http://sleepydesign.blogspot.com/" target="_blank"><img border="0" src="http://2.bp.blogspot.com/-W2BaxsFtxnA/VI72kyLUR2I/AAAAAAAACAk/hNYlO6Rwa-4/s1600/DiaDraw_Camera_Driver_ANE_promo.png"></a></div>
<br>
And more lucky is my reader will get 20% discount  until the end of 2014 by use coupon code <br>
<a href="http://sleepydesign.blogspot.com/2014/12/ane-love-is-in-air.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-65995365548417606992014-11-07T23:12:00.000+07:002014-11-07T23:12:16.624+07:00[AIR] Workaround for broken Base64 via AIR 15<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-cWikyq82nCE/VFzuDcuuSfI/AAAAAAAACAI/L5ebBI6rSt4/s1600/base64-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-cWikyq82nCE/VFzuDcuuSfI/AAAAAAAACAI/L5ebBI6rSt4/s1600/base64-1.png" height="362" width="640"></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<hr>
<h3>
Problem : Refer to <a href="http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air15_flashplayer15_releasenotes.pdf" target="_blank">AIR 15 release note</a>Â here's list of painful know issues ;)</h3>
<ol>
<li>[iPhone 6 Plus] Wrong screen size and dpi is returned through the runtime APIs.</li>
<li>[iPhone 6 Plus] iPad Launch image is displayed on iPhone 6 Plus in standard display mode.</li>
<li>Unable to install the application on iOS Simulator after updating iOS SDK and iPhone simulator with 7.1.</li>
<li><b><span style="color: red;">[HMAOT] Hurlant Base64,encode doesn't work with new fast packaging engine.</span></b></li>
<li>iOS tlfText not rendering, when application packaged with new fast packaging engine.</li>
</ol>
For me, I just got weirdo 0.01.010.1.0.. instead of normal Base64 after packing IPA and use it via iPad3 iOS 8, but lower iOS version seem to be fine.<br>
<hr>
<h3>
Solution :  Refer to  Adobe said here...</h3>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-3pZyfWo_TKc/VFztnN8IvHI/AAAAAAAACAA/7Z1K6Fv-MGA/s1600/base642.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-3pZyfWo_TKc/VFztnN8IvHI/AAAAAAAACAA/7Z1K6Fv-MGA/s1600/base642.png" height="194" width="640"></a></div>
<br>
<div class="text parbase section" style="background-color: white; border: 0px; color: #333333; font-family: adobe-clean, sans-serif; font-size: 14px; line-height: 19px; margin: 0px 0px 13px; outline: 0px; padding: 0px; zoom: 1;">
<div class="text" style="border: 0px; margin: 0px; outline: 0px; padding: 0px;">
<span style="line-height: 18px;"><br>I know you guy are lazy dude like me so here we go below quick fix for download below! :D</span><br>
<div class="parbase compbase section header" style="background-color: white; border: 0px; color: #333333; font-family: adobe-clean, sans-serif; font-size: 14px; line-height: 19px; margin: 0px 0px 13px; outline: 0px; padding: 0px; zoom: 1;">
<div style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px;">
</div>
</div>
</div></div></div><a href="http://sleepydesign.blogspot.com/2014/11/air-workaround-for-broken-base64-via.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-49932317244639959962014-11-01T22:03:00.000+07:002014-11-01T22:03:40.044+07:00[HTML] Free HTML ResourceWhat so good about HTML is they got a ton of free resource like template, script and else, Like always I will list down here for my own use later (with some ref for cats food :P)<br />
<h3>
Themes</h3>
<ol>
<li><a href="http://themifycloud.com/?aid=katopz" target="_blank">Themify Cloud</a></li>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://themifycloud.com/downloads/janux-free-responsive-admin-dashboard-template/?aid=katopz" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" src="http://4.bp.blogspot.com/-6rFxwDOUK6A/VFTavn-pUZI/AAAAAAAAB-4/sGT2AbnZyPU/s1600/janu-description.jpg" height="218" width="400" /></a></div>
<li><a href="http://bootswatch.com/" target="_blank">Bootswatch</a><br /><div class="separator" style="clear: both; text-align: center;">
<br /><a href="http://4.bp.blogspot.com/-t3s7F4q-p88/VFTr8jnFj0I/AAAAAAAAB_g/IQ5nNYere0U/s1600/bs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://4.bp.blogspot.com/-t3s7F4q-p88/VFTr8jnFj0I/AAAAAAAAB_g/IQ5nNYere0U/s1600/bs.png" height="305" width="400" /></a></div>
</li>
</ol>
<h3>
Scripts</h3>
<ol>
<li><a href="http://codevisually.com/" target="_blank">codevisually</a><br /><div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-KBIaNtzawlA/VFTmdnjZi1I/AAAAAAAAB_I/NPtiTo3btYk/s1600/cv.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-KBIaNtzawlA/VFTmdnjZi1I/AAAAAAAAB_I/NPtiTo3btYk/s1600/cv.png" height="236" width="320" /></a></div>
</li>
<li><a href="http://www.jqueryrain.com/" target="_blank">jqueryrain</a><br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-RP9WOaA908s/VFTngZA72gI/AAAAAAAAB_U/Dk0f-ZBiYpI/s1600/jqr.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-RP9WOaA908s/VFTngZA72gI/AAAAAAAAB_U/Dk0f-ZBiYpI/s1600/jqr.png" height="236" width="320" /></a></div>
</li>
</ol>
<div>
Will update when I found some more. :D</div>
<div>
<br /></div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-42204419032540853502014-10-19T21:40:00.000+07:002014-10-19T21:40:37.964+07:00[WebSockets] Can I Use Web Sockets?<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-IHUPbmWT04A/U_Q-beVd2JI/AAAAAAAAB9g/rBFXBrAIm7c/s1600/caniuse-websocket.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-IHUPbmWT04A/U_Q-beVd2JI/AAAAAAAAB9g/rBFXBrAIm7c/s1600/caniuse-websocket.png" height="322" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
I'm found this site <a href="http://caniuse.com/#feat=websockets">http://caniuse.com/#feat=websockets</a> which is super cool comparison table :D nice and easy and seem like answer is "Yes!" (judge from IE user LOL)<br />
<br />
read more : <a href="http://sleepydesign.blogspot.com/2014/08/paas-free-platform-as-service-for.html#more">http://sleepydesign.blogspot.com/2014/08/paas-free-platform-as-service-for.html#more</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-38116167348312572122014-08-23T17:23:00.001+07:002014-08-23T17:23:20.767+07:00[WTF] What the FlexPMD Authorization Required!?<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 style="text-align: left;">
Problems</h3>
<a href="http://1.bp.blogspot.com/-fkRBhb9OiEc/U-rvMFCUDAI/AAAAAAAAB8I/RVzImYbwNX0/s1600/adobe-auth-failed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-fkRBhb9OiEc/U-rvMFCUDAI/AAAAAAAAB8I/RVzImYbwNX0/s1600/adobe-auth-failed.png" height="371" width="640"></a><br>
<div class="separator" style="clear: both; text-align: left;">
<br></div>
Normally we can install FlexPMD via Adobe Open Source but not anymore...<br><br>
<h3>
Clues</h3>
<ul>
<li><a href="https://forums.adobe.com/thread/1536213">https://forums.adobe.com/thread/1536213</a></li>
</ul>
<h3>
Related Links</h3>
<div>
<ul>
<li><a href="http://sourceforge.net/adobe/flexpmd/home/Home/">http://sourceforge.net/adobe/flexpmd/home/Home/</a></li>
</ul>
<h3>
</h3></div><a href="http://sleepydesign.blogspot.com/2014/08/wtf-what-flexpmd-authorization-required.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-88298561051754442522014-08-17T22:19:00.001+07:002014-08-17T22:19:33.398+07:00[ANE] New Admob AIR Native Extension 2014<div class="separator" style="clear: both; text-align: center;">
<br></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-ixm8iB-WhiE/U_DF14EUD5I/AAAAAAAAB8o/0x8fF-zLvz0/s1600/admob-ane-2014.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-ixm8iB-WhiE/U_DF14EUD5I/AAAAAAAAB8o/0x8fF-zLvz0/s1600/admob-ane-2014.png"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">New Admob Native Extension 2014</td></tr>
</tbody></table>
<h3>
Problem</h3>
<br>
<blockquote class="tr_bq">
On August 31, 2014, legacy AdMob is shutting down. All legacy ad serving will stop soon, But no worry! Open source is here to help both iOS and Android or each! :D</blockquote>
<br>
<h3>
</h3><a href="http://sleepydesign.blogspot.com/2014/08/ane-new-admob-air-native-extension-2014.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-8502705918328473732014-08-11T23:58:00.000+07:002014-08-12T00:58:46.762+07:00[PaaS] Free Platform as a Service for NodeJS+Websockets<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-RUhd4htwH-s/U-jyWGIb8MI/AAAAAAAAB74/xGWMBPnI478/s1600/paas-nodejs-websockets.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-RUhd4htwH-s/U-jyWGIb8MI/AAAAAAAAB74/xGWMBPnI478/s1600/paas-nodejs-websockets.png"></a>
</div>
<br>I did wrote about <a href="http://en.wikipedia.org/wiki/BaaS" target="_blank">Backend as a service (BaaS)</a> for free
(development/trial out) <a href="http://sleepydesign.blogspot.com/2013/05/baas-backend-as-service-for-free.html" target="_blank">here</a>. This time I will collect about free <a href="http://en.wikipedia.org/wiki/PaaS" target="_blank">Platform-as-a-Service (PaaS)</a> that can handle <a href="http://node.js/">NodeJ</a>SÂ and <a href="http://en.wikipedia.org/wiki/WebSocket" target="_blank">Websockets</a>Â for
later use.<br>
<br>
Why now? Because... <a href="https://github.com/bma73/gordon-server" target="_blank">Gordon</a>  has <a href="https://github.com/bma73/gordon-examples" target="_blank">working example</a> which use  <a href="http://node.js/">NodeJ</a>S and <a href="http://en.wikipedia.org/wiki/WebSocket" target="_blank">Websockets</a> working quite well and
seem to be cross-platform (if I read it right) so let collect resources and do labs yeah!<br>
<br>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: center;"><a href="http://1.bp.blogspot.com/-aTV9IWmcedY/U-jqcyskUaI/AAAAAAAAB7Y/IqOt-L9bT20/s1600/heroku-logo-light-300x100.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-aTV9IWmcedY/U-jqcyskUaI/AAAAAAAAB7Y/IqOt-L9bT20/s1600/heroku-logo-light-300x100.png"></a>
</span>
</div>
<h3>
Info</h3>
<ul>
<li>Main : <a href="https://www.heroku.com/">https://www.heroku.com/</a></li>
<li>Price : <a href="https://www.heroku.com/pricing">https://www.heroku.com/pricing</a></li>
<li>NodeJS+Websockets : <a href="https://devcenter.heroku.com/articles/node-websockets">https://devcenter.heroku.com/articles/node-websockets</a>
</li>
</ul>
<h3>
Detail</h3>
<ul>
<li>512MB RAM</li>
<li>1x CPU Share</li>
<li>$0.05/dyno-hour</li>
<li>Databases 10K rows</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-HIfZqEieMuQ/U-jukitcnjI/AAAAAAAAB7k/6IsW_wN-_go/s1600/240px-OpenShift-LogoType.svg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<a href="http://sleepydesign.blogspot.com/2014/08/paas-free-platform-as-service-for.html#more">Read more »</a>katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-38489999736534952102014-08-05T22:51:00.001+07:002014-08-06T23:36:04.718+07:00[AIR] Working Genome2D Nape Physics ExampleI'm still curious about how Genome2D+Nape Physics perform via my iPhone5, The problem is <a href="https://github.com/pshtif/Genome2D-Nape">https://github.com/pshtif/Genome2D-Nape</a> is totally out date, but it's not a problem anymore after <a href="https://github.com/pshtif/Genome2D-AS3/issues/7" target="_blank">Genome2D open it source</a>, then this magically happen ;)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-crt1V460E3E/U-D5Jx69RSI/AAAAAAAAB6s/Cm2j87_o4rk/s1600/IMG_4591.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-crt1V460E3E/U-D5Jx69RSI/AAAAAAAAB6s/Cm2j87_o4rk/s1600/IMG_4591.jpg" height="400" width="225" /></a></div>
<h3>
You can try fix this yourself</h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-qRXYEjJhOBw/U-G7e-5515I/AAAAAAAAB68/OG9i1PbS1aw/s1600/gnome2d-nape.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-qRXYEjJhOBw/U-G7e-5515I/AAAAAAAAB68/OG9i1PbS1aw/s1600/gnome2d-nape.png" height="522" width="640" /></a></div>
<div>
<br />
(which actually fun)</div>
<h3>
Or just use my fixed here</h3>
<ul>
<li><a href="https://github.com/katopz/Genome2D-AS3">https://github.com/katopz/Genome2D-AS3</a></li>
<li><a href="https://github.com/katopz/Genome2D-Nape">https://github.com/katopz/Genome2D-Nape</a></li>
<li><a href="https://github.com/katopz/Genome2D-AS3-Nape-Example">https://github.com/katopz/Genome2D-AS3-Nape-Example</a></li>
</ul>
because <a href="https://github.com/pshtif/Genome2D-AS3/blob/master/src%2Fcom%2Fgenome2d%2FGenome2D.as#L43" target="_blank">original Genome2D repo is comment out all physics related</a> tho not sure why but in case it opensource, I've no mercy to fix it just for fun ;)<br />
<br />
BTW : I won't pull request back yet because it too much hack and slash there, I'll wait for stable release to avoiding refracting conflict ;)<br />
<br />
PS : Long time no code in AS3 woooot!<br />
<br />
<span style="color: red;"><b>[UPDATE]</b></span><br />
just like i said it's kinda hack for learning and after asking for more detail on this via <a href="https://groups.google.com/forum/#!forum/genome2d" target="_blank">google group</a>, turn out that that all physic stuff is get heavy refactoring there, nore detail via devcast here <a href="https://www.youtube.com/watch?v=XvH6g6h6JRQ">https://www.youtube.com/watch?v=XvH6g6h6JRQ</a> i will revisit this again...not so soon ;)katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-29356009931102980732014-08-02T23:30:00.000+07:002014-08-02T23:31:07.486+07:00[WP8] Lightning Bolt and Gear Icon of Dead<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 style="text-align: left;">
Problem</h3>
<div style="text-align: left;">
<ul>
<li>Windows Phone get stuck at this screen... lighting bolt and gear icon</li>
</ul>
</div>
<a href="http://3.bp.blogspot.com/-jBgzCZYLHfs/U90Nwf5OcWI/AAAAAAAAB6c/VkfQz3h9H6M/s1600/IMG_4561.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-jBgzCZYLHfs/U90Nwf5OcWI/AAAAAAAAB6c/VkfQz3h9H6M/s1600/IMG_4561.jpg" /></a><br />
<h3 style="text-align: left;">
Solution</h3>
<ul>
<li> Press the volume down + power keys for 5 seconds.</li>
</ul>
<h3>
Credit</h3>
<ul>
<li><a href="http://answers.microsoft.com/en-us/winphone/forum/wp8-wpupdate/lighting-bolt-and-gear-icon/515b9681-ebf6-4992-bf69-5bddc76a6332">http://answers.microsoft.com/en-us/winphone/forum/wp8-wpupdate/lighting-bolt-and-gear-icon/515b9681-ebf6-4992-bf69-5bddc76a6332</a></li>
</ul>
<br />katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-12147244631603009082014-07-07T22:44:00.001+07:002014-07-07T22:44:47.778+07:00[AIR] Workaround for aapt tool failed via AIR 14 SDK<h3>
That moments when...</h3>
when overly new AIR SDK normally we copy and paste to folder (old method)<br />
<blockquote class="tr_bq">
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0</blockquote>
and new one<br />
<blockquote class="tr_bq">
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK</blockquote>
<br />
<h3>
Tadaaa, You will get plenty of error via AIR 14 SDK beta</h3>
<blockquote class="tr_bq">
<span style="background-color: white; font-family: Helvetica; font-size: 13px; line-height: 19.440000534057617px;">aapt tool failed:C:\Users\katopz\AppData\Local\Temp\40bfcf3c-9e8c-4a1f-86bc-18bb752c0d54\captive_runtime_res\layout\wand_companion.xml:7: error: Error: No resource found that matches the given name (at 'background' with value '@color/transparent').</span></blockquote>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-6CEDDnJhGzM/U5bF3w1CdII/AAAAAAAAB5A/6dutspXBM-E/s1600/fb-air-sdk-overlay-issue.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-6CEDDnJhGzM/U5bF3w1CdII/AAAAAAAAB5A/6dutspXBM-E/s1600/fb-air-sdk-overlay-issue.jpg" height="616" width="640" /></a></div>
<br />
<h3>
More about this</h3>
<ul>
<li><a href="https://bugbase.adobe.com/index.cfm?event=bug&id=3771841">https://bugbase.adobe.com/index.cfm?event=bug&id=3771841</a></li>
<li><a href="https://forums.adobe.com/message/6446565#6446565">https://forums.adobe.com/message/6446565#6446565</a></li>
</ul>
<h3>
Workaround</h3>
Delete anything in AIRSDK folder in my case is<br />
<blockquote class="tr_bq">
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK</blockquote>
An then completely extract everything from air-sdk.zip to that folder<br />
<br />
<h3>
Say again?</h3>
Delete old SDK before overlay like usual.<br />
don't ask me why, it's just working ;pkatopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-6796014592390369912014-06-28T19:40:00.001+07:002014-06-28T19:40:10.673+07:00[WP8] Visual Studio 2013 Menu duplicated bug<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<b>Problem </b>: Menu in Visual Studio 2013 get duplicated.</div>
<div style="text-align: left;">
<br /></div>
<a href="http://2.bp.blogspot.com/-jH95v6ODHkw/U60pqaIdfjI/AAAAAAAAB5s/E7E9zvRrWHY/s1600/wp8-wtf-ui.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-jH95v6ODHkw/U60pqaIdfjI/AAAAAAAAB5s/E7E9zvRrWHY/s1600/wp8-wtf-ui.png" height="350" width="640" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Solution</b> : Run <span style="color: red;">devenv.exe /resetuserdata</span> in command line.</div>
<div class="separator" style="clear: both; text-align: left;">
Which normally exist here <span style="color: red;">C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Lessen</b> : Every IDE has it own problem tho</div>
<div>
<br /></div>
<div>
<b>PS</b>: I'm now become 100% cross-platform native programmer LOL</div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-49689397222209131482014-05-27T21:40:00.000+07:002014-05-27T21:40:46.125+07:00[FlashBuilder] How to speed up startup time<div class="separator" style="clear: both; text-align: center;">
Just don't welcome...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-C1hUXYbHGvM/U4SjKPoggdI/AAAAAAAAB4s/F4O7__GUrVs/s1600/fb-startup.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-C1hUXYbHGvM/U4SjKPoggdI/AAAAAAAAB4s/F4O7__GUrVs/s1600/fb-startup.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br />And uncheck things that you won't use...</div>
<div class="separator" style="clear: both; text-align: center;">
<br /><a href="http://3.bp.blogspot.com/-bKaJY2OE1tI/U3rYF4_HFtI/AAAAAAAAB4Y/ne8JuKivxOg/s1600/fb-speedup.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-bKaJY2OE1tI/U3rYF4_HFtI/AAAAAAAAB4Y/ne8JuKivxOg/s1600/fb-speedup.jpg" /></a></div>
<br />
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
That's it! ;D</div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-55115854332819563092014-05-20T00:18:00.000+07:002014-05-22T21:50:39.217+07:00[OSX] How to boot Maverick on PC<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-RMw3tsueAps/U3o61ss_eTI/AAAAAAAAB4I/euY9v0hbRx8/s1600/unimavs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-RMw3tsueAps/U3o61ss_eTI/AAAAAAAAB4I/euY9v0hbRx8/s1600/unimavs.png" /></a></div>
<br />
<div style="text-align: center;">
[image credit tonymacx86.com]</div>
<br />
It's about time to update <a href="http://sleepydesign.blogspot.com/2012/11/xcode-summon-unibeast-on-pc-for-xcode.html" target="_blank">my OS X via my PC</a> in case Maverick 10.9.3 is out and I just <a href="http://sleepydesign.blogspot.com/2014/04/objective-c-meaning-my-first-attempt.html" target="_blank">finish my first Xcode app</a> so I have no fear to lost my all installation (worst case) after major update in case I already backup my certificate and push all stuff to git :)<br />
<h2>
Note to self</h2>
<ol>
<li>just follow : <a href="http://www.tonymacx86.com/374-unibeast-install-os-x-mavericks-any-supported-intel-based-pc.html">http://www.tonymacx86.com/374-unibeast-install-os-x-mavericks-any-supported-intel-based-pc.html</a></li>
<li>refer to <a href="http://www.tonymacx86.com/basics/104536-troubleshooting-issuing-boot-flags.html" target="_blank">this</a>, my GTS250 will need default setting + <b><span style="color: red;">GraphicsEnabler=Yes</span></b></li>
<li>and maybe <a href="http://www.osx86.net/files/download/3123-geforce-gts-250-evga-xfx-etc/">http://www.osx86.net/files/download/3123-geforce-gts-250-evga-xfx-etc/</a></li>
<li>and my sound still need : <a href="http://www.tonymacx86.com/audio/63663-asus-p7p55d-enable-via-vt1828s-sound-10-8-a.html">http://www.tonymacx86.com/audio/63663-asus-p7p55d-enable-via-vt1828s-sound-10-8-a.html</a></li>
<li>my second monitor via HDMI not seem to work like expected so I fallback to VGA and it just work so I can live with it.</li>
<li>I realize that when freezing at spinning loading screen i will need to turn PC off not just hit reset button, same rule apply to BIOS setting which seem to be not save after freeze even I hit save button, weird but workaround is easy enough tho ;)</li>
</ol>
<div>
It's not kinda hard this time because I install over my old 10.8.5 and seem like it take all setting and configuration form old stuff so I'm happy now. yeah! </div>
<div>
<br /></div>
<div>
Happy Xcoding! ;)</div>
<div>
<br /></div>
katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0tag:blogger.com,1999:blog-7558134625651021108.post-32768648513722014452014-05-12T13:28:00.000+07:002014-05-16T22:48:59.981+07:00[ANE] How to build and use x86 ANE AIR14<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
Know how to build/use normal armv7 ANE? Here's another step :)<br />
<h2>
How to build x86 ANE AIR14 via command line</h2>
<ol>
<li>load AIR 14 here <a href="http://labs.adobe.com/technologies/flashruntimes/air/">http://labs.adobe.com/technologies/flashruntimes/air/</a></li>
<li>Read this : <a href="http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air14_flashplayer14_releasenotes.pdf">http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air14_flashplayer14_releasenotes.pdf</a></li>
<li>modify old your old <b><span style="color: blue;">extension.xml</span></b><br /><code style="word-wrap: normal;"><extension xmlns="http://ns.adobe.com/air/extension/14.0"><br /><a href="http://1.bp.blogspot.com/-U2sGH2WkEYM/U3BoOB7jJMI/AAAAAAAAB30/DbBEMyFnrCE/s1600/Screen-Shot-2014-05-12-at-1.19.29-PM.jpg" imageanchor="1" style="color: black; font-family: Times; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-U2sGH2WkEYM/U3BoOB7jJMI/AAAAAAAAB30/DbBEMyFnrCE/s1600/Screen-Shot-2014-05-12-at-1.19.29-PM.jpg" /></a><br /><span style="font-family: Times;"><br />tip : just copy whole old <b><span style="color: red;">Android-ARM</span></b> xml platform tag and change it name to <b><span style="color: red;">Android-x86 </span></b>should do the trick cause other remain same.</span></extension></code></li>
<li>and for ADT packaging command for ANE build script...<br /><br />adt -package -target ane Sample.ane extension.xml -swc Sample.swc -platform Android-ARM -C Android-ARM/ . <span style="color: red;">-platform Android-x86 -C Android-x86/ .</span></li>
</ol>
<h2>
Pitfalls and Hints</h2>
<div>
<ol>
<li>even single dot is matter for packing command, just don't miss it.</li>
<li><span style="color: red;">Android-ARM/ . </span>mean you will need Android-ARM folder and "." mean anything in that folder will be pack.</li>
<li>you can try to unzip your ANE for fun</li>
<li>in case you can unzip your old armv7 ANE, and it contain old .jar which really mean you can rebuild x86 support without original source just some guts (i don't try it yet, but it should work)</li>
</ol>
</div>
<div>
that's it!</div>
<div>
<h2>
How to check if ANE is x86 compatible</h2>
just take a look tho ;p <br />
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-qRD4u_8mWUQ/U2zI5fgZ7FI/AAAAAAAAB3c/DgQmfAa_PYQ/s1600/android-x86-howto-build-ane.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-qRD4u_8mWUQ/U2zI5fgZ7FI/AAAAAAAAB3c/DgQmfAa_PYQ/s1600/android-x86-howto-build-ane.jpg" height="337" width="400" /></a></div>
<div style="text-align: left;">
<h2>
How to use x86 architec via Flash Builder</h2>
for debug do add <span style="color: red;"><b>-arch=x86 </b></span>via customize launch like <strike>after<span style="color: red;"><b> -listen</b></span> like this</strike> (not anymore it's fixed then after May 14, 2014 you will need to add after<b> <span style="color: red;">-storetype</span></b> )</div>
<div style="text-align: left;">
<br />
<a href="http://2.bp.blogspot.com/-nmh_IPr-tws/U2zI2T0UhQI/AAAAAAAAB3U/zYU1oHEZb88/s1600/android-x86-howto-build-apk.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://2.bp.blogspot.com/-nmh_IPr-tws/U2zI2T0UhQI/AAAAAAAAB3U/zYU1oHEZb88/s1600/android-x86-howto-build-apk.jpg" height="267" width="640" /></a> </div>
but for run you will need to add before <span style="color: red;"><b>-storetype </b></span>instead (because <span style="color: red;"><b>-listen </b></span>not exist)<br />
<br />
<b><span style="color: red;">[UPDATE May 14, 2014]</span></b> : Adobe fixed this <a href="https://github.com/PrimaryFeather/Starling-Framework/issues/539">https://github.com/PrimaryFeather/Starling-Framework/issues/539</a> and you will need to add <b style="color: red;">-arch=x86</b> before <b style="color: red;">-storetype</b> from now on<br /><br /><b><span style="color: red;">[UPDATE May 16, 2014]</span></b> : refer to...<br />
<blockquote class="tr_bq">
<ul style="background-color: white; border: 0px; color: #333333; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; padding: 0px 0px 0px 30px; vertical-align: baseline;">
<li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-type: inherit; margin: 0.5ex 0px; padding: 0px; vertical-align: baseline;">3759405 : [x86]Export Release Build from Flash Builder fails to run app on Android device when -arch parameter is used.</li>
</ul>
</blockquote>
<br />
workaround is uncheck delete bin-release-temp folder and your apk will survived inside that temp folder... sound weird i know, just do it!<br />
<br />
Like my blog and need more of this? Just <a href="http://sleepydesign.blogspot.com/2014/04/objective-c-meaning-my-first-attempt.html" target="_blank">download my app </a>or feeding <a href="http://instagram.com/katopz" target="_blank">my cats</a> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=katopz%40sleepydesign%2ecom&item_name=sleepydesign&no_shipping=0&no_note=1&tax=0&currency_code=USD&charset=UTF%2d8" target="_blank">here</a><br />
<br />
Thanks! Meowww<br />
<br />katopzhttp://www.blogger.com/profile/11219001149602079158noreply@blogger.com0