- Verifique se já possui chave gerada com
cat ~/.ssh/id_rsa.pub
- Caso não possua, crie uma com
ssh-keygen -t rsa
- Execute o comando abaixo, para enviar sua RSA key para o servidor.
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var eventDown = 'ontouchstart' in document ? 'touchstart' : 'mousedown'; | |
$(document).bind(eventDown, function(ev) { | |
//do what you need | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp') | |
.factory('Camera', ['$q', function($q) { | |
return { | |
getPicture: function(options) { | |
var q = $q.defer(); | |
if(!window.cordova) { | |
var fileInput = document.createElement('input'); | |
fileInput.setAttribute('type', 'file'); |
Simply add a sleep function like
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
I want to make Ionic Framework projects work on Android 4.0.3
-
Android 4.0.3 is API Lvl 15, download it via ADV
-
npm install -g [email protected] (Newer versions may not work with android-15)
-
ionic platform add android
-
edit config.xml > ``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//For a specified field | |
db.collectionname.createIndex( | |
{ "field_name": "text" }, | |
{ name: "TextIndex" } | |
) | |
//For All Fields | |
db.collectionname.createIndex( | |
{ "$**": "text" }, | |
{ name: "TextIndex" } |