Friday, May 29, 2015

Make you Repository for Go-Gettable!

Maybe your company is using Go, and you cannot publish your software to public repositories because the code is classified.

You can add to your company repository the same functionality that allows Github and others to make you fetch the packages with go get using the information from Remote import paths documentation.

It's pretty simple, the only modification you have to do is add a meta tag in the project page of your source code management software (like Kallithea or RhoCode).

<meta name="go-import" content="yourserver/your/package git https://yourserver/your/package">

This tag tells go that the import path yourserver/your/package is a git repository located at https://yourserver/your/package

Now you can simply use go get yourserver/your/package and you will find your package in the yourserver/your/package directory in $GOPATH/src.

Wednesday, April 1, 2015

Sencha, Build and Repository

A Sencha app is made by many source files and other fixed files generated by the framework. The files full of information are:
  • app/
  • resources/
  • app.js
  • app.json
  • sass/
The other files can be ignored (see Ignored Files).

Only the files above are committed, this decrease the repository size. The following procedure is used to make a new checkout of the project.

Requirements

  • Sencha Cmd 5+
  • ExtJS 5+
You can specify the software versions in the README.md file.

Generation

With Workspace

# Checkout
hg clone <project_url> <checkout_dir>
# Workspace Generation
sencha -sdk <extjs_dir> generate workspace <workspace_dir>
# Optional - ext directory symlink
cd <workspace_dir>
rm -rf ext
ln -s <extjs_dir> ext
# App generation
cd <workspace_dir>
sencha -sdk ext generate app <app_name> <app_dir>
# Copy project files into generated project
cd <app_dir>
cp -r <checkout_dir>/* .
# Remove checkout
rm -rf <checkout_dir>

Without Workspace

# Checkout
hg clone <project_url> <checkout_dir>
# App generation
sencha -sdk <extjs_dir> generate app <app_name> <app_dir>
# Optional - ext directory symlink
cd <app_dir>
rm -rf ext
ln -s <extjs_dir> ext
# Copy project files into generated project
cd <app_dir>
cp -r <checkout_dir>/* .
# Remove checkout
rm -rf <checkout_dir>

Build

Now you can browse <app_dir> and enter the commands:
sencha app watch # development
sencha app build # production

Ignored Files

For a new project .hgignore will contain generated files
^\.sencha$
^sass/example$
^sass/config.rb$
^bootstrap.*$
^build.xml$ // remove this line if you want to enable cache
^index.html*$

Extra Styles and Script

Every other css or js file is added to app.json in the sections css e js
"css": [{
    "path": "bootstrap.css",
    "bootstrap": true
}, {
    "path": "resources/fontawesome.min.css"
}],

Enable Cache

Sencha does not use cache by default. You can enable it by adding the following code in app.json
production": {
    "loader": {
        "cache": true
    }
},
It's recommended to add a task in the build.xml that renames app.js using its own md5
<target name="-after-build">
    <checksum file="${build.dir}/app.json" property="md5"/>
    <x-echo message="After Build: add md5 to app.js"/>
    <move file="${build.dir}/app.js" tofile="${build.dir}/app.${md5}.js"/>
    <replace token="app.js" value="app.${md5}.js" file="${build.dir}/app.json"/>
    <replace token="app.js" value="app.${md5}.js" file="${build.dir}/index.html"/>
    <x-echo message="app.js checksum ${md5}"/>
</target>

Thursday, March 14, 2013

Pi day ( P stands for Purity!)


An irrational π Day to everybody!

+∞     1    dx
-∞  1 + x²

Today we (few of us -_-") celebrate the most famous irrational number. I take this opportunity to talk about the next rom I am testing right now, that seems to be one that will long!

After little more than a week from the sources release of Android 4.2.2 for the Galaxy Nexus (maguro JDQ39) one of my favorite roms strikes back with its newer version: Purity v5. Thanks to magnificent work of DarioSF, an Italian Android Developer, the smoothest and cleanest rom (after the sock one) for the device I own gets updated.

The concept behind the rom is very simple: a few features and a lot of optimizations to keep it as clean and smooth as possible. Here's the rom features list:
Features
  • JellyBean 4.2.2 JDQ39
  • AOSP sources based
  • Built with Google Gcc 4.7.3, O3, strict-aliasing
  • Fully deodexed, Rooted, Zipaligned, Busybox included
  • 0,90,180,270 degree rotation option
  • CM Tiles fully customizables!
  • CM Lockscreen security Settings
  • Extended power menu with settings
  • Theme Chooser
  • Clear all button on recent apps 
  • Option to control cursor in text fields using volume keys
  • Allow volumes to be unlinked
  • Volume rocker wake & Volume music control
  • Fixed dream settings
  • Quick message and reply & Emoji and Strip unicode support
  • Allow user-installed apps to be disabled and force stop when disabling an app
  • Templates functionality 
  • Split SMS functionality
  • Dialer - T9 & Dialpad settings
  • Low audio fix
  • Increased lock screen widget limit to 9
  • Advanced Browser Settings
  • Clock style Settings
  • Status bar brightness control 
  • Navigation Bar Settings
  • Expanded Desktop Mode
  • Cm Calculator App
  • Status Bar Settings
  • Lockscreen shortcut Settings
  • Silent Mode & Quite Hours
  • Kill app back button
  • Custom lockscreen background 
  • Purity Wallpapers app
  • Hide ime switcher
  • Bind VolUp+VolDown to toggle the ringer
  • Advanced Phone Settings (ex.Vibrate on Answer...)
  • LED control settings

Few things that I love are missing (like the AOKP navbar customiziation or the Fast Charge quick toggle) but I am more than willing to sacrifice these functionalities for its amazing performance. The rom comes out with our loved AK Kernel in its newer stable version (Purity v30). I changed it upon the latest nightly version (Cyclon v810) and after a couple of days of use I haven't got any force close, freeze or lag issue.

Wednesday, March 6, 2013

CyberGR Mod



Today I want to talk about the ROM I installed on my android phone (Galaxy Nexus GSM), CyberGR-MOD, and I want to congratulate the developer for the excellent work of his version 1.0.

Features

In addition to being based on the last official Android build (4.2.2 - JDQ39) this ROM does have many features: tweaks, system interface and application customization, profiles (CM) and other features combined with a very smooth performance powered by the excellent AK Kernel.

Bug

The only annoying bug I've found, maybe caused by some HSDPA tweak, it's with the data connection: sometimes when you switch it off and on again, it does not come back until you reboot your system.
The developer suggested to use stock radio, maybe that's the source of the problem, it makes more sense for sure. I'll do some testing and see!

Conclusion

I hope this bug gets fixed in the next release because this seems to be the one I am looking for in the endless journey of an owner of a rooted device.

Update

Version 2 is out: many minor bugs solved and other features to come!