This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Facebook login | |
$scope.fbLogin = function() { | |
$cordovaOauth.facebook("1495786770635908", ["email"]).then(function(result) { | |
//alert(result.access_token); | |
$token = result.access_token; | |
$ionicLoading.show(); | |
$http.get('https://graph.facebook.com?access_token='+$token+'&ids=me').success(function(data){ | |
sendData = { | |
id: data.me.id, | |
username: data.me.first_name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Modal | |
.modal.fade .modal-dialog { | |
-webkit-transform: scale(0.1); | |
-moz-transform: scale(0.1); | |
-ms-transform: scale(0.1); | |
transform: scale(0.1); | |
top: 300px; | |
opacity: 0; | |
-webkit-transition: all 0.3s; | |
-moz-transition: all 0.3s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//********* load image if src dont found **********// | |
myApp.directive('onErrorSrc', function() { | |
return { | |
link: function(scope, element, attrs) { | |
if(!attrs.src){ | |
attrs.$set('src', attrs.onErrorSrc); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bootstrap/app.php | |
//if production .env set APP_PUBLIC=../hogarExperto/ for example | |
if(env('APP_PUBLIC') != NULL){ | |
$app->bind('path.public', function() { | |
return base_path().env('APP_PUBLIC'); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function getEventSlug($title) { | |
$slug = Str::slug($title); | |
$slugCount = count( Service::whereRaw("slug REGEXP '^{$slug}(-[0-9]*)?$'")->get() ); | |
return ($slugCount > 0) ? "{$slug}-{$slugCount}" : $slug; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author: | |
# @Bartosz Kosarzycki | |
# | |
sudo apt-get install npm | |
sudo npm install -g react-native-cli | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
cd /home/user/your/project/path | |
react-native init AwesomeProject | |
cd AwesomeProject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fr = new FileReader(), buf, file = element.files[0]; | |
var etags = []; | |
var partSize = 6 * 1024 * 1024; // constant | |
var totalSize = file.size; | |
var numParts = Math.ceil(totalSize / partSize); | |
var key = null; | |
var uplaodId = null; | |
// 1. Init Upload | |
coverService.initUpload({fileName: file.name, fileType: 'video'}, function(res){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $HOME | |
ln -s `which php56` ~/bin/php | |
export PATH=$HOME/bin:$PATH | |
curl -sS https://getcomposer.org/installer | php56 | |
echo -e "\n# Composer\nalias composer=\"php56 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
source $HOME/.bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
function checkFiles(list){ | |
list.forEach((path) => { | |
if (!fs.existsSync(path)) { | |
console.log('-- Not found '+path) | |
} | |
}) | |
} | |
OlderNewer