The .gitignore equivalent with Perforce
Easy as Git, you could ignore some files, directories on your code submit. You only have to create a new file named .p4ignore on your workspace root. This file contains a list of rules for ignoring files when adding these to the depot. Example of .p4ignore file:
# Ignore .p4ignore files
.p4ignore
# Ignore object files, shared libraries, executables
*.dll
*.so
*.exe
# Ignore all HTML files except the readme file
*.html
!readme.html
# Ignore the bin directory
bin/
# Ignore the build.properties file in this directory
/build.properties
# Ignore all text files in test directories
test/**.txt
Sublime & Perforce
Due to a team switch I need to use Perforce instead of Git for the source code versionning… and that’s why I was looking for a Perforce plugin for Sublime Text (my favourite IDE for web development).
The only plugin I found is developped by Eric Martel and works fine. It allows you to add, checkout, delete, diff, rename, revert, diff (using p4diff) and list all checked out files. Changelist management is also supported and that’s a very good point.
- Sublime Text 3 Perforce Plugin
- Sublime Text 2 Perforce Plugin
- Author’s twitter account
- Author’s website article about this plugin
Node.JS prompt
I’ve found a nice project on Github who allows you to interact with your Node.JS server through your command line. For example, if you have to enter credentials on launching, you only have to import prompt, initialize it and use the get function… Take a look on the repo, there are a lot of functionality.
var prompt = require('prompt');
//
// Start the prompt
//
prompt.start();
//
// Get two properties from the user: username and email
//
prompt.get(['username', 'email'], function (err, result) {
//
// Log the results.
//
console.log('Command-line input received:');
console.log(' username: ' + result.username);
console.log(' email: ' + result.email);
});
Get directions from your own app
Implement a navigation in your own app will be expensive in days of development. So, if you want to offer an alternative solution, it’s possible in few code lines (below). This new intent will launch the Google Maps application with start and destionation GPS coordinates. Good solution for a POC in which the navigation is not the main feature.
String from = "20.344,34.34";
String to = "20.5666,45.345";
String endpointURL = "http://maps.google.com/maps?saddr=" + from + "&daddr=" + to;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(endpointURL));
startActivity(intent);
Dribble login
What a nice Dribble login concept. Based on Material Design with some animations (a lot!). The most interesting animation is maybe these when you switch from login in to sign in with the pink logo who slides to the rectangular submit button. Nice!