Skip to content

Instantly share code, notes, and snippets.

View nncl's full-sized avatar

Cauê Almeida nncl

View GitHub Profile
{
"points" : [
{
"title" : "Place",
"lat" : "-23.534749",
"lng" : "-46.611924"
},
{
"title" : "Place",
"lat" : "-23.539512",
ionic prepare ios

Como automatizar o backup do MySQL e exportar pra um arquivo.sql de X em X tempos? (pra um usuário que não manja nada de phpMyAdmin, pediu um executável que fizesse isso)

@echo off

echo Starting Backup of Mysql Database on server 

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set dt=%%c-%%a-%%b)

For /f "tokens=1-4 delims=:." %%a in ('echo %time%') do (set tm=%%a%%b%%c%%d)
@nncl
nncl / back-branch-to-commit.md
Created June 16, 2016 18:28
Backing current branch to earlier commit.
@nncl
nncl / ionic-device.md
Last active September 6, 2017 17:04
Ionic Device Information

Ionic Device Information

You can get information about client's device running:

var deviceInformation = ionic.Platform.device();
console.log(JSON.stringify(deviceInformation));

The console.log(JSON.stringify(deviceInformation)) shows this:

Fixing Stuff

To do not let the user touch and scroll the slides, do the following:

// app.js
app.run(function($ionicPlatform, $ionicSlideBoxDelegate) {
  $ionicPlatform.ready(function() {
    $ionicSlideBoxDelegate.enableSlide(false);
 });

Ionic + Windows

Environment:

  • Visual Studio 2015
  • SDK Windows 8