Skip to content

Instantly share code, notes, and snippets.

@jbruni
jbruni / paggy.txt
Created August 14, 2013 23:59
Contatando o usuário Paggy
http://webapps.stackexchange.com/questions/31506/contacting-another-github-user-not-already-in-any-discussions
@jbruni
jbruni / schema_defaults.sql
Created September 11, 2013 16:10
Querying information_schema at MySQL to get all DEFAULT values assigned at a given database schema. Right now I wanted this information to assign these values as default to the corresponding properties at my model classes...
SELECT * FROM `COLUMNS` WHERE (TABLE_SCHEMA = 'schema_name') AND (COLUMN_DEFAULT IS NOT NULL);
@jbruni
jbruni / example-template.html
Last active December 23, 2015 11:39
AngularJS UI Bootstrap "extension" - Popover with bindable HTML template!
<p>Here comes the <b>bindable HTML</b> popover contents!!!</p>
<p>Number: {{number}}</p>
@jbruni
jbruni / popover-template.patch
Last active December 23, 2015 12:09
AngularJS UI Bootstrap "Popover Template" PR patch (https://github.com/angular-ui/bootstrap/pull/1046)
diff --git a/src/popover/popover.js b/src/popover/popover.js
index c38ff94..55a2473 100644
--- a/src/popover/popover.js
+++ b/src/popover/popover.js
@@ -14,5 +14,19 @@ angular.module( 'ui.bootstrap.popover', [ 'ui.bootstrap.tooltip' ] )
})
.directive( 'popover', [ '$compile', '$timeout', '$parse', '$window', '$tooltip', function ( $compile, $timeout, $parse, $window, $tooltip ) {
return $tooltip( 'popover', 'popover', 'click' );
+}])
+.directive( 'popoverTemplatePopup', [ '$templateCache', '$compile', function ( $templateCache, $compile ) {
@jbruni
jbruni / ui-bootstrap-tpls-0.6.0.js
Last active December 24, 2015 03:19
Modified ui-bootstrap-tpls-0.6.0.js including "popover-template" directive. * UPDATE * included modified files for version 0.7.0
angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
angular.module("ui.bootstrap.tpls", ["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/popup.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/
@jbruni
jbruni / index.html
Created April 10, 2014 04:14
A Pen by J Bruni.
<div class="main" ng-app="codepen" ng-controller="codepenCtrl">
<p class="form-group">
<input class="form-control" type="text" value="{{ date | date:'fullDate' }}" readonly>
</p>
<p class="form-group">
<input class="form-control" type="text" ng-model="text">
</p>
@jbruni
jbruni / 0.10.0.patch
Created April 10, 2014 13:32
bootstrap-bower patches
diff --git a/ui-bootstrap-tpls.js b/ui-bootstrap-tpls.js
index cfec6be..b28849b 100644
--- a/ui-bootstrap-tpls.js
+++ b/ui-bootstrap-tpls.js
@@ -6,7 +6,7 @@
* License: MIT
*/
angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
-angular.module("ui.bootstrap.tpls", ["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/popup.html","template/modal/backdrop.html","template/modal/w
@jbruni
jbruni / app-code-structure.md
Created May 24, 2014 19:59
About large app code structure

When I decided to move on with RequireJS + AngularJS, it was September 2013, and at that time my Google search brought many results claiming it could be not a good idea. So, I was a bit uncertain about the decision. Each day it passes since that time I am more and more pleased with the results. After refactorings and tweakings, I am very satisfied, even proud, of the resulting scheme.

My front-end code base has a bower.json specifying its third-parties dependencies - RequireJs, AngularJS, jQuery, Twitter Bootstrap (I use only the CSS from it, since I use Angular UI Bootstrap directives for the components), ZeroClipboard, every "vendor" library is specified at this very simple bower.json file.

My app code is divided into front-end "apps" and "modules"... there are two main "front-end apps" - one for logged-in subscribers, and other for logged-in administrators. Each "app" has its "modules" - in fact, view + controllers + assets. It may be hard to describe, but when you see the folder structure you do not eve

@jbruni
jbruni / master.blade.php.html
Last active September 23, 2016 07:35
"index.html" template - Blade/Laravel/PHP (back-end) AngularJS/RequireJS/Mimosa (front-end)
<!DOCTYPE html>
<html class="no-js{{ empty($class) ? '' : ' ' . $class }}" lang="pt-br" xmlns:ng="http://angularjs.org" id="ng-app">
<head>
<title>{{ empty($title) ? '' : $title . ' | ' }}{{ Config::get('business.site_name') }}</title>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="robots" content="index, follow">
@jbruni
jbruni / complete_nitrous_session.log
Created June 4, 2014 21:56
Meteor deploy seems to behave differently according to submain length
_ _ _ _ ___ ___
| \ | (_) |_ _ __ ___ _ _ ___ |_ _/ _ \
| \| | | __| __/ _ \| | | / __| | | | | | Welcome!
| |\ | | |_| | | (_) | |_| \__ \_ | | |_| | Get help → help.nitrous.io
|_| \_|_|\__|_| \___/ \__,_|___(_)___\___/