Skip to content

Instantly share code, notes, and snippets.

View brunoksato's full-sized avatar
Focusing

Bruno Sato brunoksato

Focusing
View GitHub Profile
@brunoksato
brunoksato / calcular horas lol
Created January 6, 2016 13:26
HORAS LOLZINHO
(function() {
'use strict';
let minutosTotais = 0;
let segundosTotais = 0;
let horasTotais = 0;
let quantidePartidas = 0;
$('.date-duration-duration > div').each(function(index, item){
quantidePartidas += 1;
let data = item.textContent.split(':'),
@brunoksato
brunoksato / modelos.sql
Created September 24, 2015 20:10
Todos modelos de carros - SQL Like
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('AUDI')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('BMW')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('CITROEN')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('FIAT')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('FORD')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('CHEVROLET')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('HONDA')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('HYUNDAI')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('KIA')
INSERT INTO [dbo].[ModelosCarro] ([Nome]) VALUES ('MERCEDES-BENZ')
@brunoksato
brunoksato / frontendDevlopmentBookmarks.md
Last active August 29, 2015 17:52 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@brunoksato
brunoksato / gist:5e7f9b2916289d1649a4
Created June 5, 2015 04:21
Gps Enable Cordova Ionic
function GeolocationSync(){
var existLatLong = Application.getPosition();
if(existLatLong === null){
$ionicLoading.show({
templateUrl: 'templates/components/sync.html',
scope: $scope
});
function mapQuery($q) {
return {
require: ['esriFeatureLayer', '^esriMap', 'query'],
scope:{
url: "="
},
controller: function ($scope, $element, $attrs) {
var queryDeferred = $q.defer();
angular.module('teste', [])
.controller('OneCtrl', OneCtrl)
.controller('SecondCtrl', SecondCtrl)
.service('ServiceGlobal', ServiceGlobal);
function OneCtrl($scope, ServiceGlobal){
$scope.data = {id: 1, nome: 'ola mundo'};
ServiceGlobal.addData($scope.data, true);
}

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@brunoksato
brunoksato / ionicLoading
Created November 19, 2014 23:44
Ionic Loading
angular.module('ionicApp', ['ionic'])
.controller('AppCtrl', function($scope, $timeout, $ionicLoading) {
// Setup the loader
$scope.loading = $ionicLoading.show({
content: '<i class="icon ion-loading-c"></i>',
animation: 'fade-in',
showBackdrop: false,
maxWidth: 50,
showDelay: 0
@brunoksato
brunoksato / gist:ce9c995d831f39f10d0f
Created August 26, 2014 18:04
Grid Error colunas
'use strict';
angular.module('grid', [])
.run(templateRun)
.directive('grid', Grid);
function templateRun ($templateCache) {
$templateCache.put('grid2.html', '<table><thead><tr><th ng-repeat="(key,value) in option.columns" ng-click="sort(value.predicate)"><strong>{{value.text}}</strong><th><tr></thead><tbody><tr ng-repeat="data in option.data"><td ng-repeat="field in data">{{field}}</td></tr></tbody></table>');
}
@brunoksato
brunoksato / gulpfile.js
Created August 5, 2014 13:55
com browserfy
/**
* Created by Bruno on 01/08/2014.
*/
var gulp = require('gulp'),
gutil = require('gulp-util'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
browserify = require('browserify'),
concat = require('gulp-concat'),