$ curl -sS https://getcomposer.org/installer | phpadicionar no .bashrc
alias composer="/usr/bin/php -d \"disable_functions=\" ~/composer.phar"
$ curl -sS https://getcomposer.org/installer | phpadicionar no .bashrc
alias composer="/usr/bin/php -d \"disable_functions=\" ~/composer.phar"
| 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
| var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8) | |
| return v.toString(16) | |
| }) |
| @import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);html{height:100%;}body{height:100%;margin:0;padding:0;background-color:#fafafa;direction:ltr;}body.fixed-header .header{position:fixed;left:0;top:0;}body.mobile .sidebar-menu{overflow:scroll;-webkit-overflow-scrolling:touch;}body.mobile .sidebar-menu>ul{height:auto!important;overflow:visible!important;-webkit-overflow-scrolling:touch!important;}body.mobile .page-sidebar .sidebar-menu .menu-items li:hover a{color:#788195;}body.mobile .page-sidebar .sidebar-menu .menu-items li:hover .icon-thumbnail{color:#788195!important;}body.mobile .page-sidebar .sidebar-menu .menu-items li.active>a,body.mobile .page-sidebar .sidebar-menu .menu-items li.open>a{color:#fff;}body.mobile .page-sidebar .sidebar-menu .menu-items li.active>.icon-thumbnail,body.mobile .page-sidebar .sidebar-menu .menu-items li.open>.icon-thumbnail{color:#fff;}body.mobile .drager{overflow:auto;-webkit-overflow-scrolling:touch;}body.sidebar-visible .page-sidebar .scroll-element{vi |
| import preact, { h, render, Component } from 'preact' | |
| class Page extends Component { | |
| componentDidMount() { | |
| $('.btn').draggable({ iframeFix: true, iframeScroll: true }) | |
| $('.render').on('load', () => { | |
| $('.render').contents().find('[wf-droppable]').droppable({ | |
| over: ({ target, toElement }) => $(target).css({ border: '2px solid #000000' }), | |
| out: ({ target, toElement }) => $(target).css({ border: 'none' }), |
| //https://facebook.github.io/react/docs/web-components.html#using-react-in-your-web-components | |
| const proto = Object.create(HTMLElement.prototype, { | |
| attachedCallback: { | |
| value: function() { | |
| const mountPoint = document.createElement('span'); | |
| this.createShadowRoot().appendChild(mountPoint); | |
| const name = this.getAttribute('name'); | |
| const url = 'https://www.google.com/search?q=' + encodeURIComponent(name); | |
| ReactDOM.render(<a href={url}>{name}</a>, mountPoint); |
| export default { | |
| bindings: { | |
| colors: '<', | |
| selector: '@' | |
| }, | |
| templateUrl: 'views/color-picker.html', | |
| controller: class { | |
| //@ngInject | |
| constructor($window, $timeout) { |
| var colors = { | |
| "black": "#000000", | |
| "white": "#ffffff", | |
| "blue": { | |
| "50": "#e3f2fd", | |
| "100": "#bbdefb", | |
| "200": "#90caf9", | |
| "300": "#64b5f6", | |
| "400": "#42a5f5", |
| function factorial(number) { | |
| var result = 1 | |
| do { | |
| result = result * number | |
| number-- | |
| } while (number > 0) | |
| return result | |
| } | |
| console.log(factorial(7)) |
| class Fibonacci { | |
| /** | |
| * @param {number} value | |
| * @returns {number} | |
| */ | |
| sequence (value) { | |
| return (value < 2) ? value : this.sequence(value - 1) + this.sequence(value - 2) | |
| } | |
| /** |
| create table if not exists corretora ( | |
| `codigo` integer auto_increment, | |
| `nome` varchar(50) not null, | |
| `usuario` varchar(50) not null unique key, | |
| `senha` varchar(50) not null, | |
| constraint `pk_corretora` primary key(`codigo`) | |
| ); | |
| create table if not exists `cliente` ( | |
| `codigo` integer auto_increment not null, |